/* ============================================
   ROLOF IMT – CERTIFICATE REGISTRATION PAGE
   cert-register.css  |  extends style2.css + portal.css + studentlogin.css
   ============================================ */

/* ============================================
   BODY
   ============================================ */
.certreg-body {
    background: #f0f4fc;
}

/* ============================================
   HERO
   ============================================ */
.certreg-hero {
    background-image: linear-gradient(rgba(4, 43, 107, 0.85), rgba(4, 43, 107, 0.75)),
                      url('../images/campus.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 180px;
    display: flex;
    align-items: center;
}

.certreg-hero-overlay {
    width: 100%;
    padding: 42px 0 32px;
}

.certreg-hero-content { color: #fff; }

.certreg-hero-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 12px;
}

.certreg-hero-badge {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.certreg-hero-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 5px;
    text-shadow: 1px 2px 6px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.certreg-hero-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.certreg-main { background: #f0f4fc; }

/* ============================================
   SIDEBAR
   ============================================ */
.creg-sidebar { position: sticky; top: 90px; }

/* Programme info card */
.creg-info-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid #e4eaf6;
}

.creg-info-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 22px 22px 18px;
    text-align: center;
}

.creg-info-header i {
    font-size: 32px;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
}

.creg-info-header h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
}

.creg-info-header p {
    font-size: 12px;
    opacity: 0.85;
    margin: 0;
    line-height: 1.5;
}

.creg-programme-list {
    list-style: none;
    padding: 14px 18px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.creg-programme-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--text-dark);
    padding: 8px 0;
    border-bottom: 1px solid #f0f3fa;
    transition: all 0.2s ease;
}

.creg-programme-list li:last-child { border-bottom: none; }

.creg-programme-list li:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

.creg-programme-list li i {
    color: var(--primary-color);
    font-size: 10px;
    flex-shrink: 0;
}

/* Steps card */
.creg-steps-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e4eaf6;
}

.creg-steps-card h6 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef1fb;
}

.creg-steps-card h6 i { color: var(--primary-color); }

.creg-step {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f7fb;
}

.creg-step:last-child { border-bottom: none; }

.creg-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eef1fb;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #d8e0f0;
}

.creg-step-active {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(11,94,215,0.25);
}

.creg-step strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.creg-step p {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* Help card */
.creg-help-card {
    background: var(--primary-dark);
    border-radius: 14px;
    padding: 18px 20px;
    text-align: center;
    color: #fff;
}

.creg-help-card i {
    font-size: 26px;
    color: var(--accent-color);
    margin-bottom: 8px;
    display: block;
}

.creg-help-card p {
    font-size: 13px;
    opacity: 0.8;
    margin: 0 0 6px;
}

.creg-help-card a {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    margin-bottom: 2px;
    transition: opacity 0.2s;
}

.creg-help-card a:hover { opacity: 0.8; }

.creg-help-card span {
    font-size: 12px;
    opacity: 0.55;
    display: block;
    margin: 3px 0;
}

/* ============================================
   FORM HEADER
   ============================================ */
.creg-form-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--primary-color);
}

.creg-form-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.creg-form-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.creg-form-header p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.creg-progress {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    padding: 18px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e4eaf6;
}

.creg-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.cps-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef1fb;
    border: 2px solid #d0d8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.creg-progress-step.active .cps-circle {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px rgba(11,94,215,0.28);
}

.creg-progress-step.done .cps-circle {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.creg-progress-step span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.creg-progress-step.active span { color: var(--primary-color); }

.creg-progress-line {
    flex: 1;
    height: 2px;
    background: #d0d8f0;
    margin: 0 8px;
    margin-bottom: 20px;
    border-radius: 2px;
}

/* ============================================
   FORM SECTIONS
   ============================================ */
.creg-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.creg-section {
    background: #fff;
    border-radius: 16px;
    padding: 28px 28px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e4eaf6;
    margin-bottom: 20px;
}

.creg-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f3fa;
}

.cst-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(11,94,215,0.22);
}

.creg-section-title h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* ============================================
   INPUT STYLES (extend studentlogin)
   ============================================ */
.req-star { color: #dc3545; margin-left: 2px; }
.creg-optional { font-size: 11px; color: var(--text-light); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Select element */
.lf-select {
    width: 100%;
    padding: 13px 42px 13px 42px;
    border: 1.5px solid #d8e0f0;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: #f8faff;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.lf-select:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(11,94,215,0.10);
}

/* Textarea wrap */
.lf-textarea-wrap {
    position: relative;
}

.lf-textarea-icon {
    position: absolute;
    top: 14px;
    left: 14px;
    color: var(--primary-color);
    font-size: 15px;
    pointer-events: none;
    z-index: 2;
}

.lf-textarea-wrap textarea {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 1.5px solid #d8e0f0;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: #f8faff;
    outline: none;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

.lf-textarea-wrap textarea:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(11,94,215,0.10);
}

.lf-textarea-wrap textarea::placeholder {
    color: #b0bcd4;
    font-size: 13px;
}

/* Error state */
.creg-input-error {
    border-color: #dc3545 !important;
    background: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(220,53,69,0.10) !important;
}

.creg-invalid-msg {
    display: none;
    font-size: 12px;
    color: #dc3545;
    margin-top: 5px;
    font-weight: 500;
}

/* ============================================
   PASSWORD STRENGTH
   ============================================ */
.pw-strength-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pwsb-track {
    flex: 1;
    height: 5px;
    background: #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.pwsb-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.4s ease, background 0.4s ease;
}

.pwsb-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-light);
    min-width: 90px;
    transition: color 0.3s ease;
}

/* Password rules */
.pw-rules {
    background: #f5f7fb;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #e4eaf6;
}

.pw-rules > p {
    font-size: 12px;
    color: var(--text-light);
    margin: 0 0 10px;
    font-weight: 600;
}

.pw-rules > p i { color: var(--primary-color); }

.pw-rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pw-rule {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #9aa5bc;
    font-weight: 500;
    transition: color 0.2s ease;
}

.pw-rule i { font-size: 11px; color: #d0d8f0; transition: color 0.2s ease; }

.pw-rule-ok { color: #198754 !important; }
.pw-rule-ok i { color: #198754 !important; }

/* Password match */
.pw-match-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

/* ============================================
   TERMS + SUBMIT
   ============================================ */
.creg-submit-zone {
    background: #fff;
    border-radius: 16px;
    padding: 26px 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e4eaf6;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.creg-terms {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.creg-terms input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.creg-terms label {
    font-size: 13px;
    color: var(--text-dark);
    line-height: 1.65;
    cursor: pointer;
}

.creg-terms label a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.creg-terms label a:hover { text-decoration: underline; }

/* Submit button */
.btn-certreg-submit {
    width: 100%;
    padding: 15px 24px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(11,94,215,0.22);
}

.btn-certreg-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), #021a45);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(11,94,215,0.35);
}

.btn-certreg-submit:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-loading { display: inline-flex; align-items: center; }

/* Form bottom links */
.creg-form-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
}

.creg-back-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}
.creg-back-link:hover { color: var(--primary-color); }

.creg-divider-dot { color: #ccc; }

.creg-have-account { color: var(--text-light); }
.creg-have-account a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}
.creg-have-account a:hover { text-decoration: underline; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .certreg-hero { background-attachment: scroll; }
    .certreg-hero-title { font-size: 22px; }
    .creg-progress { padding: 14px 16px; }
    .cps-circle { width: 34px; height: 34px; font-size: 14px; }
}

@media (max-width: 767px) {
    .certreg-hero-inner { flex-direction: column; gap: 12px; text-align: center; }
    .certreg-hero-badge { margin: 0 auto; }
    .creg-section { padding: 22px 18px 18px; }
    .creg-submit-zone { padding: 20px 18px; }
    .creg-form-header { padding: 16px 18px; flex-direction: column; text-align: center; }
    .pw-rules-grid { grid-template-columns: 1fr; }
    .creg-progress { gap: 4px; }
    .creg-progress-step span { display: none; }
    .creg-progress-line { margin-bottom: 0; }
}

@media (max-width: 575px) {
    .creg-section { padding: 18px 14px; }
    .btn-certreg-submit { font-size: 14px; padding: 13px 18px; }
    .creg-form-links { flex-direction: column; gap: 8px; }
}
