/* ===== MANIT Alumni — Light Theme ===== */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg:        #f7f8fc;
    --surface:   #ffffff;
    --surface-2: #f1f4f9;
    --border:    #e4e7ed;
    --border-2:  #d5d9e0;
    --text:      #1a1d24;
    --text-dim:  #6b7280;
    --text-muted:#9ca3af;
    --primary:   #4f46e5;
    --primary-2: #7c3aed;
    --primary-h: #4338ca;
    --primary-soft: #eef2ff;
    --success:   #059669;
    --success-soft: #d1fae5;
    --danger:    #dc2626;
    --danger-soft: #fee2e2;
    --accent:    #0891b2;
    --warning-soft: #fef3c7;
    --radius:    14px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow:    0 4px 16px rgba(30,41,59,0.08);
    --shadow-lg: 0 12px 40px rgba(30,41,59,0.12);
}

html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    background:
        radial-gradient(ellipse 80% 50% at top left, rgba(79,70,229,0.06), transparent 60%),
        radial-gradient(ellipse 80% 50% at top right, rgba(124,58,237,0.05), transparent 60%),
        var(--bg);
    min-height: 100vh;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.muted       { color: var(--text-muted); }
.muted-small { color: var(--text-muted); font-size: 0.8rem; margin: 0.4rem 0 0; }

/* ===== Navbar ===== */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0.9rem 1.25rem;
    display: flex; justify-content: space-between; align-items: center;
}
.brand {
    display: flex; align-items: center; gap: 0.6rem;
    font-weight: 700; font-size: 1.15rem;
    color: var(--text); text-decoration: none;
}
.brand-logo { font-size: 1.4rem; }
.brand-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.9rem;
    border: none; cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white;
    box-shadow: 0 4px 14px rgba(79,70,229,0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79,70,229,0.4);
    text-decoration: none;
}
.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; border-color: var(--border-2); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

/* ===== Hero ===== */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    margin: 0 0 0.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1a1d24 0%, #4f46e5 50%, #7c3aed 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}
.hero-sub {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin: 0 0 2rem;
}
.hero-sub strong { color: var(--primary); }

/* ===== Search ===== */
.search-box {
    display: flex; gap: 0.5rem;
    max-width: 640px; margin: 0 auto;
    background: var(--surface);
    padding: 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.search-box input {
    flex: 1; min-width: 200px;
    background: transparent; border: none; outline: none;
    padding: 0.7rem 0.9rem;
    color: var(--text); font-size: 0.95rem;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box button {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white; border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600; cursor: pointer;
    transition: transform 0.15s;
}
.search-box button:hover { transform: translateY(-1px); }
.clear-link {
    align-self: center; padding: 0 0.8rem;
    color: var(--text-dim); font-size: 0.9rem;
}

/* ===== Flash ===== */
.flash {
    background: var(--success-soft);
    color: var(--success);
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(5,150,105,0.2);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* ===== List Header ===== */
.main { padding-bottom: 4rem; }
.list-header {
    display: flex; justify-content: space-between; align-items: center;
    margin: 1rem 0 1.5rem;
}
.list-header h2 {
    font-size: 1.4rem; margin: 0; font-weight: 700;
}
.list-header .count {
    color: var(--text-dim); font-weight: 400; font-size: 1rem;
}

/* ===== Grid / Cards ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.2rem;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: relative;
    transition: all 0.25s ease;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.card.is-owner {
    border-color: rgba(5,150,105,0.3);
    background: linear-gradient(180deg, rgba(5,150,105,0.02), var(--surface) 40%);
}

.card-top {
    display: flex; align-items: flex-start; gap: 0.85rem;
    margin-bottom: 1rem;
}
.avatar {
    width: 52px; height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white;
    font-weight: 700; font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(79,70,229,0.25);
}
.avatar-img {
    object-fit: cover;
    display: block;
}
.card-head { flex: 1; min-width: 0; }
.card-head h3 {
    margin: 0 0 0.2rem;
    font-size: 1.05rem;
    font-weight: 700;
    overflow-wrap: break-word;
    color: var(--text);
}
.post-line {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin: 0 0 0.35rem;
    overflow-wrap: break-word;
}
.badge {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.edit-btn {
    width: 34px; height: 34px;
    flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--primary-soft);
    border-radius: 50%;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.15s;
    font-size: 0.9rem;
}
.edit-btn:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
    transform: rotate(-10deg) scale(1.08);
}

.card-body {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 0.1rem;
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}
.card-body li {
    display: flex; gap: 0.7rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(0,0,0,0.04);
}
.card-body li:last-child { border-bottom: none; }
.card-body .k {
    color: var(--text-muted);
    min-width: 90px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 3px;
    font-weight: 600;
}
.card-body .v {
    color: var(--text);
    flex: 1;
    overflow-wrap: break-word; word-break: break-word;
}
.card-body .v.muted { color: var(--text-muted); font-size: 0.82rem; }
.card-body a { color: var(--accent); }

.owner-tag {
    margin-top: 0.85rem;
    padding: 0.4rem 0.8rem;
    background: var(--success-soft);
    color: var(--success);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.03em;
}

/* ===== Empty ===== */
.empty-state {
    text-align: center; padding: 4rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border-2);
}
.empty-state p { color: var(--text-dim); margin-bottom: 1.5rem; }

/* ===== Form ===== */
.form-wrap {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
    max-width: 820px;
}
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.25rem;
    box-shadow: var(--shadow);
}
.form-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}
.form-header p {
    color: var(--text-dim);
    margin: 0 0 2rem;
}

/* Photo upload */
.photo-upload {
    display: flex; gap: 1.25rem; align-items: center;
    padding: 1.25rem;
    background: var(--surface-2);
    border: 1px dashed var(--border-2);
    border-radius: var(--radius-sm);
    margin-bottom: 1.75rem;
}
.photo-preview {
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    max-width: 120px;
    max-height: 120px;
    flex-shrink: 0;
    flex-grow: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface);
    border: 2px solid var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-preview img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 50%;
}
.photo-placeholder {
    color: var(--text-muted);
    font-size: 1.8rem;
    text-align: center;
    line-height: 1.2;
}
.photo-placeholder small { font-size: 0.65rem; display: block; margin-top: 4px; }
.photo-controls { flex: 1; }
.photo-status {
    margin: 0.5rem 0 0;
    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}
.photo-status--info {
    background: var(--primary-soft);
    color: var(--primary);
}
.photo-status--ok {
    background: var(--success-soft);
    color: var(--success);
}
.photo-status--error {
    background: var(--danger-soft);
    color: var(--danger);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
    letter-spacing: 0.02em;
}
.field .req { color: var(--danger); }
.field input {
    background: var(--surface);
    border: 1px solid var(--border-2);
    color: var(--text);
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.15s;
    outline: none;
}
.field input::placeholder { color: var(--text-muted); }
.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.form-actions {
    margin-top: 2rem;
    display: flex; gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}
.form-hint {
    margin-top: 1.5rem;
    padding: 0.9rem 1rem;
    background: var(--primary-soft);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}
.alert-error {
    background: var(--danger-soft);
    border: 1px solid rgba(220,38,38,0.2);
    color: var(--danger);
}
.alert-error ul { margin: 0.5rem 0 0 1.25rem; }

/* ===== Footer ===== */
.footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.88rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    background: var(--surface);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-card { padding: 1.5rem 1.25rem; }
    .hero { padding: 2.5rem 0 2rem; }
    .photo-upload { flex-direction: column; text-align: center; }
    .nav-actions .btn span { display: none; }
}

/* =========================================================
   YOUTH BRIGADE 2005-2025 MANIT — additions
   ========================================================= */

/* Brigade heading — reusable */
.brigade-heading {
    display: inline-block;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.75rem;
}

/* Larger variant for the hero area on the list page */
.brigade-heading--hero {
    font-size: 1rem;
    letter-spacing: 0.18em;
    padding: 0.6rem 1.4rem;
    margin-bottom: 1rem;
}

/* Textarea styling — match existing inputs */
.form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    resize: vertical;
    min-height: 110px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Select styling — match inputs for consistency */
.form select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='%236b7280' d='M6 8L0 0h12z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.2rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Badges container — allows branch + blood group side by side */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

/* Blood group badge — red tint so it's visually distinct */
.badge-blood {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
    font-weight: 600;
}

/* About box on the card */
.about-box {
    margin-top: 0.85rem;
    padding: 0.75rem 0.9rem;
    background: var(--surface-2);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.about-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}
.about-text {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

/* =========================================================
   Extended additions — section titles, checkbox, new badges
   ========================================================= */

/* Section titles inside the form */
.form .section-title {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 1.5rem 0 -0.25rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--primary-soft);
}
.form .section-title:first-of-type { margin-top: 0.5rem; }

/* Checkbox label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}
.checkbox-label:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

/* Job type badge */
.badge-job {
    background: #ecfccb;
    color: #3f6212;
    border-color: #d9f99d;
    font-weight: 600;
}

/* Private (hidden contact) badge */
.badge-private {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
    font-weight: 600;
}

/* Achievements variant of about-box */
.about-box--achievements {
    border-left-color: #d97706;
    background: #fffbeb;
    margin-top: 0.85rem;
}

/* Alert variants */
.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}
.alert-warning {
    background: #fef3c7;
    color: #78350f;
    border: 1px solid #fde68a;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}
.alert-warning code {
    background: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid #fde68a;
}

/* Make geo selects feel snappy on mobile */
.field select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
