/**
 * Library Book Grant & Pathagar Registration Stylesheet
 * 100% Conflict-Free, Modern Responsive Grid & Clean Mobile First Design
 */

:root {
    --lib-primary: #047857;
    --lib-primary-dark: #064e3b;
    --lib-primary-light: #ecfdf5;
    --lib-primary-hover: #059669;
    --lib-accent: #10b981;
    --lib-gold: #f59e0b;
    --lib-gold-light: #fef3c7;
    --lib-border: #cbd5e1;
    --lib-border-light: #e2e8f0;
    --lib-text-main: #0f172a;
    --lib-text-muted: #64748b;
    --lib-bg-card: #ffffff;
    --lib-bg-soft: #f8fafc;
    --lib-danger: #dc2626;
    --lib-danger-light: #fef2f2;
    --lib-shadow-sm: 0 2px 8px rgba(4, 120, 87, 0.06);
    --lib-shadow-md: 0 8px 24px rgba(6, 78, 59, 0.08);
    --lib-shadow-lg: 0 16px 36px rgba(6, 78, 59, 0.12);
    --lib-radius: 12px;
}

/* Dark mode theme support */
[data-bs-theme="dark"] :root,
[data-theme="dark"] :root,
body.dark-mode {
    --lib-primary-light: #064e3b33;
    --lib-border: #334155;
    --lib-border-light: #1e293b;
    --lib-text-main: #f1f5f9;
    --lib-text-muted: #94a3b8;
    --lib-bg-card: #0f172a;
    --lib-bg-soft: #1e293b;
    --lib-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Base Wrapper */
.library-grant-wrapper {
    max-width: 920px;
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--lib-text-main);
    padding: 0 8px;
}

/* Card Container */
.library-card-box {
    background: var(--lib-bg-card);
    border: 1.5px solid var(--lib-primary);
    border-radius: var(--lib-radius);
    box-shadow: var(--lib-shadow-md);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

/* Banner / Header Bar */
.lib-header-banner {
    background: linear-gradient(135deg, #064e3b 0%, #047857 60%, #059669 100%);
    color: #ffffff;
    padding: 20px 24px;
    position: relative;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

.lib-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.lib-title-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lib-logo-wrapper {
    width: 100px;
    height: 50px;
    background: #ffffff;
    border-radius: 8px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.lib-header-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 575px) {
    .lib-logo-wrapper {
        width: 80px;
        height: 40px;
        padding: 3px 5px;
    }
}

.lib-title-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 20px;
    flex-shrink: 0;
}

.lib-main-title {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.lib-sub-title {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 3px;
    font-weight: 500;
}

.lib-badge-pill {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Progress Completion Bar */
.lib-progress-wrap {
    background: var(--lib-bg-soft);
    border-bottom: 1px solid var(--lib-border-light);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lib-progress-info {
    font-size: 12px;
    font-weight: 600;
    color: var(--lib-text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.lib-progress-track {
    flex-grow: 1;
    max-width: 300px;
    height: 7px;
    background: #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.lib-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981 0%, #047857 100%);
    border-radius: 10px;
    transition: width 0.35s ease;
}

.lib-progress-percent {
    font-size: 12px;
    font-weight: 700;
    color: var(--lib-primary);
    min-width: 32px;
    text-align: right;
}

/* Notice Strip */
.lib-notice-bar {
    background: var(--lib-primary-light);
    border-left: 4px solid var(--lib-primary);
    padding: 11px 18px;
    font-size: 12.5px;
    color: #065f46;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

[data-bs-theme="dark"] .lib-notice-bar,
[data-theme="dark"] .lib-notice-bar {
    color: #a7f3d0;
}

.lib-notice-bar i {
    font-size: 15px;
    margin-top: 2px;
    color: var(--lib-primary);
    flex-shrink: 0;
}

/* Modern Upgraded Section Header */
.lib-section-head {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--lib-text-main);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.2px;
    padding: 11px 20px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .lib-section-head,
[data-theme="dark"] .lib-section-head {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    color: #f8fafc;
}

.lib-section-head .sec-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lib-section-head .sec-icon-pill {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #ecfdf5;
    color: var(--lib-primary);
    border: 1px solid #a7f3d0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .lib-section-head .sec-icon-pill,
[data-theme="dark"] .lib-section-head .sec-icon-pill {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

/* Modern Conflict-Free Grid System */
.lib-form-body {
    padding: 18px 20px;
}

.lib-grid-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px 16px;
    align-items: start;
}

.lib-col-12 { grid-column: span 12; }
.lib-col-8  { grid-column: span 8; }
.lib-col-6  { grid-column: span 6; }
.lib-col-4  { grid-column: span 4; }
.lib-col-3  { grid-column: span 3; }

/* Form Field Container */
.lib-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.lib-field-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--lib-text-main);
    line-height: 1.35;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 3px;
    gap: 8px;
    white-space: nowrap;
}

.lib-field-label > span,
.lib-field-label > div,
.lib-field-label > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.lib-field-label .badge {
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
}

.lib-field-label .sub-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--lib-text-muted);
    margin-left: auto;
    white-space: nowrap;
}

/* Form Controls */
.lib-input,
.lib-select,
.lib-textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--lib-border);
    border-radius: 6px;
    padding: 7px 11px;
    font-size: 13.5px;
    color: var(--lib-text-main);
    background-color: var(--lib-bg-card);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.lib-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
    padding-right: 32px;
    cursor: pointer;
}

.lib-input:focus,
.lib-select:focus,
.lib-textarea:focus {
    border-color: var(--lib-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.16);
}

.lib-input::placeholder,
.lib-textarea::placeholder {
    color: #94a3b8;
    font-size: 12.5px;
}

.lib-input.is-invalid,
.lib-select.is-invalid {
    border-color: var(--lib-danger);
    background-color: var(--lib-danger-light);
}

.lib-input.is-valid,
.lib-select.is-valid {
    border-color: var(--lib-accent);
}

/* Phone input group */
.lib-phone-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.lib-phone-prefix {
    background: var(--lib-bg-soft);
    border: 1px solid var(--lib-border);
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 0 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--lib-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.lib-phone-group .lib-input {
    border-radius: 0 6px 6px 0;
}

/* Photo Upload Box Component */
.lib-photo-card {
    background: var(--lib-bg-soft);
    border: 1px solid var(--lib-border-light);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 200px;
}

.lib-photo-box {
    width: 130px;
    height: 150px;
    border: 2px dashed #94a3b8;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--lib-bg-card);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    transition: all 0.2s ease;
}

.lib-photo-box:hover, 
.lib-photo-box.drag-over {
    border-color: var(--lib-primary);
    background: #f0fdf4;
    transform: scale(1.02);
}

.lib-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.lib-photo-placeholder {
    padding: 8px;
    color: var(--lib-text-muted);
}

.lib-photo-placeholder .icon {
    font-size: 24px;
    color: var(--lib-primary);
    margin-bottom: 2px;
}

.lib-photo-placeholder .prompt-title {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--lib-primary-dark);
}

.lib-photo-placeholder .prompt-sub {
    font-size: 9.5px;
    color: #64748b;
    margin-top: 1px;
}

.lib-photo-badge {
    font-size: 10.5px;
    font-weight: 700;
    background: var(--lib-primary);
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 4px;
    margin-top: 6px;
    display: none;
}

.lib-photo-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 38, 38, 0.9);
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    border: none;
    z-index: 5;
}

/* Category / Genre Chips */
.genre-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 4px 0;
}

.genre-chip-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: var(--lib-bg-soft);
    border: 1px solid var(--lib-border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--lib-text-main);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.genre-chip-item:hover {
    border-color: var(--lib-primary);
    transform: translateY(-1px);
}

.genre-chip-item.active {
    background: var(--lib-primary-light);
    border-color: var(--lib-primary);
    color: var(--lib-primary-dark);
    font-weight: 600;
}

.genre-chip-item input[type="checkbox"] {
    accent-color: var(--lib-primary);
    cursor: pointer;
    width: 14px;
    height: 14px;
    margin: 0;
}

/* Word Counter Badge */
.lib-word-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}

.lib-word-badge.badge-safe {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.lib-word-badge.badge-warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.lib-word-badge.badge-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Submission Footer */
.lib-submission-footer {
    background: var(--lib-bg-soft);
    border-top: 1px solid var(--lib-border);
    padding: 22px 20px;
    text-align: center;
}

.lib-declaration-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--lib-text-main);
    margin-bottom: 16px;
    text-align: left;
}

.lib-declaration-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--lib-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.lib-btn-submit {
    background: linear-gradient(135deg, #064e3b 0%, #047857 60%, #059669 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(4, 120, 87, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lib-btn-submit:hover:not(:disabled) {
    background: #064e3b;
    transform: translateY(-1px);
    color: #ffffff;
}

.lib-btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.lib-field-hint {
    font-size: 11px;
    color: var(--lib-text-muted);
    margin-top: 2px;
}

/* ==========================================================================
   CLEAN & CONFLICT-FREE MOBILE RESPONSIVE OPTIMIZATIONS (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .library-grant-wrapper {
        padding: 0 4px;
    }
    
    .library-card-box {
        border-radius: 8px;
        border-width: 1px;
    }
    
    .lib-header-banner {
        padding: 15px 16px;
    }
    
    .lib-title-icon {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
    
    .lib-main-title {
        font-size: 16px;
    }
    
    .lib-sub-title {
        font-size: 11.5px;
    }
    
    .lib-progress-wrap {
        padding: 8px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .lib-progress-info {
        justify-content: space-between;
        width: 100%;
    }
    
    .lib-progress-track {
        max-width: 100%;
        width: 100%;
    }
    
    .lib-form-body {
        padding: 14px 14px;
    }
    
    /* Force 1 column on mobile to eliminate side scroll and overlapping */
    .lib-grid-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .lib-col-12,
    .lib-col-8,
    .lib-col-6,
    .lib-col-4,
    .lib-col-3 {
        width: 100%;
    }
    
    .lib-photo-card {
        min-height: auto;
        padding: 10px;
        margin-top: 4px;
    }
    
    .lib-photo-box {
        width: 140px;
        height: 155px;
    }
    
    /* Touch-friendly inputs with font-size >= 16px to prevent iOS auto-zoom */
    .lib-input,
    .lib-select,
    .lib-textarea {
        font-size: 15px;
        min-height: 44px;
        padding: 9px 12px;
    }
    
    .genre-chip-item {
        width: 100%;
        padding: 9px 12px;
        font-size: 13px;
        justify-content: flex-start;
    }
    
    .lib-declaration-check {
        font-size: 12.5px;
    }
    
    .lib-btn-submit {
        width: 100%;
        padding: 13px 20px;
        font-size: 15px;
    }
}

/* ==========================================================================
   Customer Authentication Gate & Representative Banner Styles (Premium Modern Design)
   ========================================================================== */
.lib-auth-gate-card {
    background: #ffffff;
    border: 1.5px solid #059669;
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(4, 120, 87, 0.1), 0 8px 10px -6px rgba(4, 120, 87, 0.05);
    overflow: hidden;
    margin-bottom: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] .lib-auth-gate-card,
body.dark-mode .lib-auth-gate-card {
    background: #0f172a;
    border-color: #059669;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.lib-auth-gate-header {
    background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%);
    color: #ffffff;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.lib-auth-gate-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.2px;
}

.lib-auth-gate-body {
    padding: 24px;
    background: #ffffff;
}

[data-bs-theme="dark"] .lib-auth-gate-body,
body.dark-mode .lib-auth-gate-body {
    background: #0f172a;
}

/* Modern Pill Segmented Nav Tabs */
.lib-auth-nav-tabs {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

[data-bs-theme="dark"] .lib-auth-nav-tabs,
body.dark-mode .lib-auth-nav-tabs {
    background: #1e293b;
    border-color: #334155;
}

.lib-auth-tab-btn {
    flex: 1;
    text-align: center;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lib-auth-tab-btn:hover:not(.active) {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}

[data-bs-theme="dark"] .lib-auth-tab-btn:hover:not(.active),
body.dark-mode .lib-auth-tab-btn:hover:not(.active) {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.lib-auth-tab-btn.active {
    background: #047857;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

/* Password Eye Toggle Wrap */
.lib-pwd-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lib-pwd-wrap .lib-input {
    padding-right: 42px;
}

.lib-pwd-eye {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s, background-color 0.15s;
    font-size: 14px;
}

.lib-pwd-eye:hover {
    color: #047857;
    background: #f1f5f9;
}

[data-bs-theme="dark"] .lib-pwd-eye:hover,
body.dark-mode .lib-pwd-eye:hover {
    color: #34d399;
    background: #334155;
}

/* OTP Dedicated Modern Verification Container */
.lib-otp-box-card {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px 18px;
    transition: all 0.2s ease;
}

.lib-otp-box-card:focus-within {
    border-color: #047857;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.12);
}

[data-bs-theme="dark"] .lib-otp-box-card,
body.dark-mode .lib-otp-box-card {
    background: #1e293b;
    border-color: #334155;
}

.lib-otp-code-input {
    letter-spacing: 6px;
    font-size: 18px !important;
    font-weight: 700;
    text-align: center;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px 0 0 8px !important;
    height: 44px;
    transition: all 0.15s ease;
}

.lib-otp-code-input:focus {
    border-color: #047857 !important;
    box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.2) !important;
}

[data-bs-theme="dark"] .lib-otp-code-input,
body.dark-mode .lib-otp-code-input {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

/* Action Button */
.lib-btn-auth-action {
    background: linear-gradient(135deg, #064e3b 0%, #047857 60%, #059669 100%);
    border: none;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 700;
    padding: 11px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lib-btn-auth-action:hover:not(:disabled) {
    background: #064e3b;
    box-shadow: 0 6px 16px rgba(4, 120, 87, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

.lib-btn-auth-action:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Representative Identity Bar */
.lib-user-badge-bar {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(4, 120, 87, 0.06);
}

[data-bs-theme="dark"] .lib-user-badge-bar,
body.dark-mode .lib-user-badge-bar {
    background: rgba(6, 78, 59, 0.3);
    border-color: #065f46;
}

.lib-user-info-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #064e3b;
}

[data-bs-theme="dark"] .lib-user-info-text,
body.dark-mode .lib-user-info-text {
    color: #a7f3d0;
}

.lib-user-switch-link {
    font-size: 12.5px;
    font-weight: 700;
    color: #dc2626;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.lib-user-switch-link:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

[data-bs-theme="dark"] .lib-user-switch-link,
body.dark-mode .lib-user-switch-link {
    background: #1e293b;
    border-color: #7f1d1d;
    color: #fca5a5;
}

/* Locked Form Transition Overlay */
.lib-form-locked-msg {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

