/* ============================================================
   ডিজাইন টোকেন
   পটভূমি: হালকা কাগজের মতো অফ-হোয়াইট
   প্রধান রঙ: গাঢ় জলপাই-সবুজ (প্রাতিষ্ঠানিক, মাদরাসা লেটারহেডের ধাঁচ)
   অ্যাকসেন্ট: নিভৃত পিতল/সোনালি রঙ
   ============================================================ */
:root {
    --paper: #FAF7EF;
    --paper-raised: #FFFFFF;
    --ink: #24261F;
    --ink-soft: #5B5D4F;
    --green-900: #1B3B2E;
    --green-700: #234A38;
    --green-50: #EAF0EB;
    --brass: #A9834A;
    --brass-soft: #D9C7A3;
    --line: #E4DFCF;
    --error: #A3372C;
    --radius: 3px;
    --font-display: 'Noto Serif Bengali', 'Noto Serif', serif;
    --font-body: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
}

/* বাংলা সংখ্যায় (১, ২, ৩...) নম্বরযুক্ত তালিকার জন্য */
@counter-style bengali-number {
    system: numeric;
    symbols: "০" "১" "২" "৩" "৪" "৫" "৬" "৭" "৮" "৯";
    suffix: "। ";
}
ol.bn-list {
    list-style: none;
    counter-reset: bn-counter;
    margin: 0;
    padding-inline-start: 4px;
}
ol.bn-list > li {
    counter-increment: bn-counter;
    position: relative;
    padding-inline-start: 30px;
}
ol.bn-list > li::before {
    content: counter(bn-counter, bengali-number);
    position: absolute;
    inset-inline-start: 0;
    color: var(--brass);
    font-weight: 700;
}

.site-header {
    background: var(--green-900);
    color: #F4EFE2;
    padding: 22px 20px;
    text-align: center;
    border-bottom: 3px solid var(--brass);
    position: relative;
}

.site-header .header-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.site-header .logo {
    height: 64px;
    width: auto;
    flex-shrink: 0;
}

.site-header .header-text {
    text-align: left;
}

/* একদম নিচে ডান কোণে ছোট, অস্পষ্ট অ্যাডমিন-লগইন লিংক — সহজে চোখে না পড়ার জন্য */
.admin-login-link {
    position: fixed;
    bottom: 10px;
    right: 12px;
    font-size: 0.7rem;
    line-height: 1;
    color: var(--ink-soft);
    opacity: 0.3;
    text-decoration: none;
    padding: 4px 7px;
    border-radius: var(--radius);
    z-index: 50;
    transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.admin-login-link:hover,
.admin-login-link:focus-visible {
    opacity: 1;
    background: var(--green-900);
    color: var(--brass-soft);
    outline: none;
}

@media (max-width: 480px) {
    .site-header .header-inner { gap: 10px; }
    .site-header .logo { height: 48px; }
}

.site-header .org-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: 0.01em;
}

.site-header .form-title {
    font-size: 1.25rem;
    color: var(--brass-soft);
    margin: 0;
    font-weight: 600;
}

.wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 18px 80px;
}

.notice {
    background: #FDF3E9;
    border: 1px solid var(--brass-soft);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.notice.closed {
    background: #F5EBE9;
    border-color: #D8B9B4;
    color: var(--error);
}

.errors {
    background: #FBEDEB;
    border: 1px solid var(--error);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 24px;
}
.errors p { margin: 0 0 6px; font-weight: 600; color: var(--error); }
.errors ul { margin: 0; padding-inline-start: 20px; color: var(--error); }

form {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.section {
    padding: 28px 26px;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.section:last-of-type { border-bottom: none; }

.section-marker {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
}

.section-marker .num {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--brass);
    line-height: 1;
    min-width: 34px;
}

.section-marker h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--green-900);
}

.section-hint {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: -10px 0 16px 46px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}
@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 0; }
.form-group.full { grid-column: 1 / -1; }

label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--green-700);
    margin-bottom: 6px;
}
label .req { color: var(--error); margin-inline-start: 3px; }

input[type=text], input[type=tel], input[type=date], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #FFFEFB;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 3px rgba(169, 131, 74, 0.18);
}

textarea { resize: vertical; min-height: 70px; }

.photo-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.photo-preview {
    width: 96px;
    height: 120px;
    border: 1px dashed var(--brass-soft);
    border-radius: var(--radius);
    background: var(--green-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    font-size: 0.75rem;
    text-align: center;
    overflow: hidden;
    flex-shrink: 0;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.file-upload-row {
    background: var(--green-50);
    border: 1px dashed var(--brass-soft);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.file-upload-row input[type=file] {
    width: 100%;
    font-size: 0.88rem;
}
.file-upload-row .current-file {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-top: 6px;
}

/* শর্তাবলি পেজ */
.terms-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
}

.terms-title {
    display: block;
    width: 100%;
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--green-900);
    text-align: center;
    margin: 0 0 26px;
    line-height: 1.5;
}

.terms-section { margin-bottom: 24px; }
.terms-section h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--brass);
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
    margin: 0 0 12px;
}

.terms-section ol, .terms-section ul {
    margin: 0;
    padding-inline-start: 22px;
}
.terms-section li {
    margin-bottom: 10px;
    font-size: 0.93rem;
    color: var(--ink);
    line-height: 1.7;
}
.terms-section li.deadline {
    color: var(--error);
    font-weight: 600;
}

.contact-block p {
    font-size: 0.93rem;
    line-height: 1.8;
    margin: 0;
}

.agree-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--green-50);
    border: 1px solid var(--brass-soft);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--green-900);
    margin-top: 10px;
    cursor: pointer;
}
.agree-row input { width: auto; margin-top: 3px; flex-shrink: 0; }

.same-as-perm {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.same-as-perm input { width: auto; }

.submit-row {
    padding: 26px;
    text-align: center;
}

button[type=submit] {
    background: var(--green-900);
    color: #F4EFE2;
    border: none;
    padding: 14px 44px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    transition: background 0.15s ease;
}
button[type=submit]:hover { background: var(--brass); color: var(--green-900); }
button[type=submit]:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.help-text {
    text-align: center;
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-top: 10px;
}

/* সফলতার পেজ */
.success-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 28px;
    text-align: center;
}
.success-card .app-id {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--green-900);
    background: var(--green-50);
    display: inline-block;
    padding: 10px 26px;
    border-radius: var(--radius);
    margin: 16px 0;
    letter-spacing: 0.03em;
}
.success-card .edit-link {
    word-break: break-all;
    background: #FDF3E9;
    border: 1px solid var(--brass-soft);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
