/* ======================================================================== */
/* VeraCita Private Library Page - P0 Shell                                */
/* Reuses design tokens from veracita-tokens.css and account.css patterns  */
/* ======================================================================== */

/* ===== TRUST BANNER ===== */
.library-trust-banner {
    background: rgba(129, 140, 248, 0.06);
    border: 1px solid rgba(129, 140, 248, 0.18);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.library-trust-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(129, 140, 248, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.library-trust-icon svg {
    width: 18px;
    height: 18px;
    stroke: #818CF8;
}

.library-trust-text {
    flex: 1;
}

.library-trust-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vc-text-primary, #E8EAED);
    margin-bottom: 4px;
}

.library-trust-points {
    font-size: 0.82rem;
    color: var(--vc-text-secondary, #A8ADBE);
    line-height: 1.6;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
}

.library-trust-points li::before {
    content: "- ";
}

/* ===== VAULT TOGGLE ROW ===== */
.library-vault-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--vc-bg-surface, #161922);
    border: 1px solid var(--vc-border-default, rgba(255,255,255,0.06));
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.library-vault-toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--vc-text-primary, #E8EAED);
}

.library-vault-toggle-desc {
    font-size: 0.8rem;
    color: var(--vc-text-secondary, #A8ADBE);
    margin-top: 2px;
}

/* Toggle switch reuses account.css pattern */
.library-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.library-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.library-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    transition: background 0.2s, border-color 0.2s;
}

.library-toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: left 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.library-toggle-switch input:checked + .library-toggle-slider {
    background: rgba(62, 207, 142, 0.3);
    border-color: rgba(62, 207, 142, 0.4);
}

.library-toggle-switch input:checked + .library-toggle-slider::before {
    left: 23px;
    background: #3ECF8E;
}

/* ===== UPLOAD AREA ===== */
.library-upload-area {
    border: 2px dashed rgba(129, 140, 248, 0.25);
    border-radius: 14px;
    padding: 40px 32px;
    text-align: center;
    background: rgba(129, 140, 248, 0.03);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 8px;
}

.library-upload-area:hover,
.library-upload-area.drag-over {
    border-color: rgba(129, 140, 248, 0.5);
    background: rgba(129, 140, 248, 0.07);
}

.library-upload-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(129, 140, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.library-upload-icon svg {
    width: 22px;
    height: 22px;
    stroke: #818CF8;
}

.library-upload-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vc-text-primary, #E8EAED);
    margin-bottom: 6px;
}

.library-upload-subtitle {
    font-size: 0.82rem;
    color: var(--vc-text-tertiary, #8B90A0);
    margin-bottom: 16px;
}

.library-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: rgba(129, 140, 248, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #818CF8;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.library-upload-btn:hover {
    background: rgba(129, 140, 248, 0.2);
    border-color: rgba(129, 140, 248, 0.4);
}

/* ===== LICENCE ATTESTATION ===== */
.library-attestation {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(240, 180, 41, 0.04);
    border: 1px solid rgba(240, 180, 41, 0.12);
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.82rem;
    color: var(--vc-text-secondary, #A8ADBE);
}

.library-attestation input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: #818CF8;
    cursor: pointer;
}

.library-attestation label {
    cursor: pointer;
    line-height: 1.5;
}

/* ===== QUOTA BAR ===== */
.library-quota-section {
    margin-bottom: 28px;
}

.library-quota-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.library-quota-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--vc-text-secondary, #A8ADBE);
}

.library-quota-value {
    font-size: 0.82rem;
    color: var(--vc-text-muted, #505568);
}

.library-quota-track {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.library-quota-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #818CF8, #6366F1);
    transition: width 0.4s ease;
}

/* ===== DOCUMENTS TABLE ===== */
.library-docs-header {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vc-text-muted, #505568);
    margin-bottom: 10px;
}

.library-docs-table {
    width: 100%;
    border-collapse: collapse;
}

.library-docs-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--vc-text-tertiary, #8B90A0);
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid var(--vc-border-default, rgba(255,255,255,0.06));
}

.library-docs-table td {
    padding: 12px;
    font-size: 0.85rem;
    color: var(--vc-text-secondary, #A8ADBE);
    border-bottom: 1px solid var(--vc-border-subtle, rgba(255,255,255,0.04));
    vertical-align: middle;
}

.library-docs-table tr:last-child td {
    border-bottom: none;
}

.library-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.library-status-badge.embedded {
    background: rgba(62, 207, 142, 0.08);
    color: #3ECF8E;
    border: 1px solid rgba(62, 207, 142, 0.15);
}

.library-status-badge.processing {
    background: rgba(240, 180, 41, 0.06);
    color: #F0B429;
    border: 1px solid rgba(240, 180, 41, 0.15);
}

.library-status-badge.error {
    background: rgba(248, 113, 113, 0.06);
    color: #F87171;
    border: 1px solid rgba(248, 113, 113, 0.15);
}

/* ===== EMPTY STATE ===== */
.library-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--vc-text-tertiary, #8B90A0);
}

.library-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.library-empty-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--vc-text-muted, #505568);
}

.library-empty-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vc-text-secondary, #A8ADBE);
    margin-bottom: 6px;
}

.library-empty-text {
    font-size: 0.83rem;
    line-height: 1.6;
    max-width: 340px;
    margin: 0 auto;
}

/* ===== SECTION CARD ===== */
.library-section-card {
    background: var(--vc-bg-surface, #161922);
    border: 1px solid var(--vc-border-default, rgba(255,255,255,0.06));
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.library-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--vc-text-primary, #E8EAED);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.library-section-title svg {
    width: 16px;
    height: 16px;
    stroke: #818CF8;
}

/* ===== VAULT AWARENESS CARD - Screen 1 ===== */
.vault-awareness-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    margin-top: 16px;
    background: rgba(129, 140, 248, 0.04);
    border: 1px solid rgba(129, 140, 248, 0.14);
    border-radius: 10px;
    text-align: left;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.vault-card-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(129, 140, 248, 0.1);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vault-card-icon svg {
    width: 16px;
    height: 16px;
    stroke: #818CF8;
}

.vault-card-body {
    flex: 1;
    min-width: 0;
}

.vault-card-heading {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--vc-text-primary, #E8EAED);
    margin: 0 0 3px;
}

.vault-card-text {
    font-size: 0.78rem;
    color: var(--vc-text-tertiary, #8B90A0);
    line-height: 1.5;
    margin: 0;
}

.vault-card-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #818CF8;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(129, 140, 248, 0.2);
    background: rgba(129, 140, 248, 0.07);
    transition: background 0.15s, border-color 0.15s;
}

.vault-card-cta:hover {
    background: rgba(129, 140, 248, 0.14);
    border-color: rgba(129, 140, 248, 0.35);
}

.vault-card-cta svg {
    width: 12px;
    height: 12px;
}

/* ===== VAULT STATUS CHIP - Screen 1 ===== */
.vault-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-top: 14px;
    background: rgba(62, 207, 142, 0.06);
    border: 1px solid rgba(62, 207, 142, 0.15);
    border-radius: 20px;
    font-size: 0.78rem;
}

.vault-chip-icon {
    width: 14px;
    height: 14px;
    stroke: #3ECF8E;
}

.vault-chip-label {
    color: var(--vc-text-secondary, #A8ADBE);
    font-weight: 500;
}

.vault-chip-link {
    color: #818CF8;
    font-weight: 600;
    text-decoration: none;
    padding: 0 2px;
}

.vault-chip-link:hover {
    text-decoration: underline;
}
