:root {
    --pink-900: #880e4f;
    --pink-800: #ad1457;
    --pink-700: #c2185b;
    --pink-600: #d81b60;
    --pink-500: #e91e63;
    --pink-100: #fce4ec;
    --pink-50: #fff5f8;
    --crimson-600: #dc3545;
    --crimson-700: #bb2d3b;
    --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #fde4ec 100%);
    --header-gradient: linear-gradient(90deg, #ad1457 0%, #d81b60 100%);
    --surface: #ffffff;
    --border: #f3c6d7;
    --text-main: #1f2937;
    --text-muted: #5c5058;
    --radius-lg: 18px;
    --radius-md: 10px;
    --shadow-card: 0 15px 40px rgba(173, 20, 87, 0.12);
}

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

body {
    margin: 0;
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-container {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 18px;
}

/* Top Banner (matches result.icitchirawa.in pink gradient header) */
.portal-topbar {
    background: var(--header-gradient);
    color: #ffffff;
    padding: 20px 0 18px;
    box-shadow: 0 6px 22px rgba(173, 20, 87, 0.25);
    border-bottom: 3px solid rgba(255, 255, 255, 0.22);
}

.topbar-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: relative;
}

.brand-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.topbar-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.brand-sub {
    font-size: 0.88rem;
    color: #fce4ec;
    margin-top: 2px;
    font-weight: 500;
}

.topbar-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    background: #ffffff;
    color: var(--pink-800);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: background 0.18s ease, transform 0.12s ease, color 0.18s ease;
}

.nav-pill:hover {
    background: var(--pink-100);
    color: var(--pink-900);
    transform: translateY(-1px);
}

.nav-pill-outline {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: none;
}

.nav-pill-outline:hover {
    background: rgba(255, 255, 255, 0.26);
    color: #ffffff;
}

/* Main Content */
.main-wrap {
    flex: 1;
    padding-top: 28px;
    padding-bottom: 42px;
}

/* Search Card */
.search-card {
    background: var(--surface);
    border: 1px solid rgba(173, 20, 87, 0.14);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: var(--shadow-card);
}

.eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--pink-800);
    background: var(--pink-100);
    border: 1px solid #f8bbd0;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.search-card-head h1 {
    margin: 0 0 6px;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--pink-900);
}

.search-card-head p {
    margin: 0 0 22px;
    font-size: 0.94rem;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--pink-900);
}

.req {
    color: var(--pink-600);
}

.opt {
    font-weight: 500;
    color: #8c6d7b;
    font-size: 0.8rem;
}

.form-field input,
.form-field select {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--pink-50);
    border: 1.5px solid #e9b9ca;
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--pink-600);
    box-shadow: 0 0 0 3px rgba(216, 27, 96, 0.16);
}

.field-hint {
    font-size: 0.76rem;
    color: #8c6d7b;
}

.form-actions-row {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f5d0de;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.autoprint-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
}

.autoprint-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--pink-700);
    cursor: pointer;
}

.btn-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.16s ease, transform 0.1s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.btn-sm {
    height: 36px;
    padding: 0 14px;
    font-size: 0.84rem;
}

.btn-primary {
    background: var(--header-gradient);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(173, 20, 87, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #880e4f 0%, #ad1457 100%);
}

.btn-secondary {
    background: var(--crimson-600);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.24);
}

.btn-secondary:hover {
    background: var(--crimson-700);
}

.btn-ghost {
    background: #ffffff;
    color: var(--pink-800);
    border-color: #f4b6cc;
}

.btn-ghost:hover {
    background: var(--pink-50);
    color: var(--pink-900);
}

/* Alerts */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.mt-3 {
    margin-top: 18px;
    margin-bottom: 0;
}

.alert-warning {
    background: #fff8e1;
    border-color: #ffe082;
    border-left: 5px solid var(--pink-700);
    color: #7c2d12;
}

.alert-danger {
    background: #fdecea;
    border-color: #f8bbd0;
    border-left: 5px solid #c62828;
    color: #b71c1c;
}

.alert-info {
    background: var(--pink-100);
    border-color: #f48fb1;
    border-left: 5px solid var(--pink-700);
    color: var(--pink-900);
}

/* Result Toolbar */
.result-toolbar {
    margin-top: 26px;
    margin-bottom: 18px;
    background: #ffffff;
    border: 1px solid rgba(173, 20, 87, 0.18);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: 0 8px 24px rgba(173, 20, 87, 0.09);
}

.toolbar-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.94rem;
    color: var(--pink-900);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2e7d32;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.18);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.multi-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--pink-100);
    border: 1px solid #f48fb1;
    color: var(--pink-900);
    padding: 10px 16px;
    border-radius: 10px;
    margin: 0 auto 10px;
    max-width: 198mm;
    font-size: 0.88rem;
}

.portal-footer {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
    border-top: 1px solid #f3c6d7;
    padding: 16px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #666666;
}

@media (max-width: 720px) {
    .portal-topbar {
        padding: 16px 0;
    }
    .brand-title {
        font-size: 1.05rem;
    }
    .search-card {
        padding: 20px 18px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-group {
        width: 100%;
    }
    .btn-group .btn {
        flex: 1;
    }
    .toolbar-actions {
        width: 100%;
    }
    .toolbar-actions .btn {
        flex: 1;
    }
}
