/* ============================================================
   ETMS — Public registration portal styles
   ============================================================ */

body.public-layout {
    background:
        radial-gradient(circle at 10% 0%, rgba(115,103,240,0.08), transparent 40%),
        radial-gradient(circle at 90% 100%, rgba(0,207,232,0.08), transparent 40%),
        #F6F7FB;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

body.public-layout.urdu-mode,
body.public-layout.urdu-mode input,
body.public-layout.urdu-mode textarea,
body.public-layout.urdu-mode select,
body.public-layout.urdu-mode .form-label,
body.public-layout.urdu-mode .form-text,
body.public-layout.urdu-mode label,
body.public-layout.urdu-mode h1,
body.public-layout.urdu-mode h2,
body.public-layout.urdu-mode h3,
body.public-layout.urdu-mode h4,
body.public-layout.urdu-mode h5,
body.public-layout.urdu-mode h6,
body.public-layout.urdu-mode p,
body.public-layout.urdu-mode span,
body.public-layout.urdu-mode a,
body.public-layout.urdu-mode .btn,
body.public-layout.urdu-mode .alert {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Montserrat', sans-serif;
    line-height: 2;
}

/* Header */
.public-header {
    background: var(--etms-gradient-deep, linear-gradient(135deg,#1F4E79,#2E7CB8));
    color: #fff;
    box-shadow: 0 4px 18px rgba(31,78,121,0.18);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.public-header a { color: #fff; }
.brand-badge {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    display: inline-flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
}
.brand-badge svg { width: 22px; height: 22px; color: #fff; }

.lang-switcher {
    display: flex;
    background: rgba(255,255,255,0.14);
    padding: 4px;
    border-radius: 50rem;
    backdrop-filter: blur(8px);
}
.lang-btn {
    padding: 6px 14px;
    border-radius: 50rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
    display: flex; align-items: center; gap: 6px;
    transition: all 0.2s ease;
}
.lang-btn .flag { font-size: 1rem; line-height: 1; }
.lang-btn.active {
    background: #fff;
    color: #1F4E79 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.public-main {
    flex: 1;
    padding: 2.5rem 0;
}

/* Hero */
.public-hero {
    position: relative;
    padding: 3rem 2rem;
    border-radius: 1rem;
    background: var(--etms-gradient-deep, linear-gradient(135deg,#1F4E79,#2E7CB8));
    color: #fff;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px -20px rgba(31,78,121,0.45);
}
.public-hero h1 {
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
}
.public-hero p { color: rgba(255,255,255,0.92); margin-bottom: 0; }
.public-hero::before,
.public-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}
.public-hero::before { width: 280px; height: 280px; top: -100px; right: -80px; }
.public-hero::after  { width: 180px; height: 180px; bottom: -70px; left: -40px; }

/* Form card */
.registration-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 20px 50px -20px rgba(34,41,47,0.2);
    border: 0;
    animation: etmsFadeUp 0.6s ease both;
}
.registration-card .card-header {
    background: transparent;
    border-bottom: 1px dashed rgba(115,103,240,0.2);
    padding: 1.5rem;
}
.registration-card .card-body { padding: 1.5rem 2rem 2rem; }

.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50rem;
    background: rgba(115,103,240,0.12);
    color: #7367F0;
    font-weight: 600;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
}

.field-group {
    padding: 1rem 0 0.5rem;
}
.field-group-title {
    color: #1F4E79;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(115,103,240,0.18);
}
.field-group-title svg { color: #7367F0; width: 18px; height: 18px; }

.form-label { font-weight: 600; color: #5E5873; font-size: 0.85rem; }
.required::after { content: " *"; color: #EA5455; }

.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #E6E6E6;
    transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: #7367F0;
    box-shadow: 0 0 0 0.2rem rgba(115,103,240,0.15);
}

/* Photo upload preview */
.photo-upload-wrap {
    border: 2px dashed #d8d6de;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
    background: #FAFAFA;
}
.photo-upload-wrap:hover {
    border-color: #7367F0;
    background: rgba(115,103,240,0.04);
}
.photo-preview {
    width: 120px; height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    background: #F0F0F0;
    display: block;
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.photo-preview.empty {
    display: flex; align-items: center; justify-content: center;
    color: #B9B9C3;
}

/* Char counter */
.char-counter { font-size: 0.75rem; color: #B9B9C3; text-align: right; }

/* Success page */
.success-card {
    max-width: 640px;
    margin: 2rem auto;
    text-align: center;
    background: #fff;
    padding: 3rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 50px -20px rgba(40,199,111,0.35);
    animation: etmsPop 0.6s cubic-bezier(.34,1.56,.64,1) both;
}
.success-icon {
    width: 110px; height: 110px;
    border-radius: 50%;
    background: var(--etms-gradient-success, linear-gradient(135deg,#28C76F,#48DA89));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    color: #fff;
    animation: etmsPulse 2s infinite;
}
.success-icon svg { width: 48px; height: 48px; }
.reference-no {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 0.5rem;
    background: rgba(115,103,240,0.1);
    color: #7367F0;
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 1rem 0;
}

/* Footer */
.public-footer {
    background: #0F2A47;
    color: rgba(255,255,255,0.7);
    margin-top: auto;
}

/* RTL tweaks */
[dir="rtl"] .public-header .gap-2 { gap: 0.5rem; }
[dir="rtl"] .field-group-title svg { margin-left: 0.5rem; margin-right: 0; }
