:root{
    --library-blue:#2563eb;
    --library-blue-soft:#eff6ff;
    --library-border:#e2e8f0;
    --library-text:#0f172a;
    --library-muted:#64748b;
}

.resume-library-page{
    max-width:1500px;
    margin:36px auto 70px;
    padding:0 28px;
}

.resume-library-hero{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:28px;
    padding:34px;
    background:linear-gradient(135deg,#eff6ff,#f8fafc 62%,#f0fdf4);
    border:1px solid var(--library-border);
    border-radius:24px;
    box-shadow:0 18px 45px rgba(15,23,42,.07);
}

.resume-library-eyebrow{
    margin:0 0 10px;
    color:var(--library-blue);
    font-size:13px;
    font-weight:800;
    letter-spacing:.12em;
}

.resume-library-hero h1{
    margin:0 0 12px;
    color:var(--library-text);
    font-size:clamp(38px,5vw,60px);
    letter-spacing:-.04em;
}

.resume-library-hero p:not(.resume-library-eyebrow){
    max-width:720px;
    margin:0;
    color:var(--library-muted);
    font-size:17px;
    line-height:1.7;
}

.library-primary-button,
.resume-library-controls button,
.resume-library-card-actions button{
    border:1px solid var(--library-border);
    border-radius:11px;
    background:#fff;
    color:var(--library-text);
    font:inherit;
    font-weight:700;
    cursor:pointer;
}

.library-primary-button{
    padding:13px 18px !important;
    background:var(--library-blue) !important;
    color:#fff !important;
    border-color:var(--library-blue) !important;
}

.resume-library-stats{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:18px;
    margin-top:24px;
}

.resume-library-stat{
    padding:20px 22px;
    background:#fff;
    border:1px solid var(--library-border);
    border-radius:17px;
    box-shadow:0 8px 24px rgba(15,23,42,.05);
}

.resume-library-stat small{display:block;color:var(--library-muted);font-weight:700;margin-bottom:7px}
.resume-library-stat strong{display:block;color:var(--library-text);font-size:27px;overflow-wrap:anywhere}

.resume-library-controls{
    display:grid;
    grid-template-columns:minmax(250px,1fr) auto auto;
    gap:14px;
    align-items:center;
    margin:26px 0 22px;
}

.resume-library-search,
.resume-library-sort{
    width:100%;
    margin:0 !important;
    padding:13px 15px;
    border:1px solid var(--library-border);
    border-radius:12px;
    background:#fff;
    color:var(--library-text);
    font:inherit;
    box-sizing:border-box;
}

.resume-library-filters{display:flex;gap:8px;flex-wrap:wrap}
.resume-library-filters button{padding:11px 14px}
.resume-library-filters button.active{background:var(--library-blue-soft);color:var(--library-blue);border-color:#bfdbfe}

.resume-library-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:20px;
}

.resume-library-card{
    display:flex;
    flex-direction:column;
    min-height:385px;
    padding:22px;
    background:#fff;
    border:1px solid var(--library-border);
    border-radius:20px;
    box-shadow:0 10px 30px rgba(15,23,42,.06);
    transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}

.resume-library-card:hover{transform:translateY(-3px);box-shadow:0 18px 40px rgba(15,23,42,.1)}
.resume-library-card.is-current{border:2px solid #60a5fa;box-shadow:0 12px 34px rgba(37,99,235,.12)}
.resume-library-card-top{display:flex;justify-content:space-between;align-items:center}
.resume-document-icon{width:52px;height:52px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:var(--library-blue-soft);font-size:27px}
.resume-favourite-button{border:0;background:transparent;font-size:28px;color:#94a3b8;cursor:pointer;padding:5px}
.resume-favourite-button.is-favourite{color:#f59e0b}
.resume-library-card-body{flex:1;margin-top:22px}
.resume-card-badges{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}
.resume-card-badge{padding:5px 9px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:11px;font-weight:800}
.resume-card-badge.current{background:#dbeafe;color:#1d4ed8}
.resume-card-badge.archived{background:#fef3c7;color:#92400e}
.resume-library-card h2{margin:0 0 7px;color:var(--library-text);font-size:22px;line-height:1.25}
.resume-card-role{margin:0 0 5px;color:var(--library-blue);font-weight:700}
.resume-card-person{margin:0;color:var(--library-muted)}
.resume-card-meta{display:grid;gap:8px;margin-top:19px;color:var(--library-muted);font-size:13px}
.resume-library-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:20px}
.resume-library-card-actions button{padding:10px 9px;font-size:13px;margin:0 !important;width:auto}
.resume-library-card-actions .library-primary-button{grid-column:1/-1}
.resume-library-card-actions .danger{color:#be123c;background:#fff1f2;border-color:#fecdd3}

.resume-library-empty{grid-column:1/-1;padding:65px 30px;text-align:center;background:#fff;border:1px dashed #cbd5e1;border-radius:20px}
.resume-library-empty-icon{font-size:52px}
.resume-library-empty h2{margin:15px 0 7px;color:var(--library-text)}
.resume-library-empty p{margin:0 0 20px;color:var(--library-muted)}

body.dark-mode .resume-library-hero{background:linear-gradient(135deg,#1e293b,#111827);border-color:#334155}
body.dark-mode .resume-library-hero h1,
body.dark-mode .resume-library-stat strong,
body.dark-mode .resume-library-card h2,
body.dark-mode .resume-library-empty h2{color:#f8fafc}
body.dark-mode .resume-library-hero p:not(.resume-library-eyebrow),
body.dark-mode .resume-library-stat small,
body.dark-mode .resume-card-person,
body.dark-mode .resume-card-meta,
body.dark-mode .resume-library-empty p{color:#cbd5e1}
body.dark-mode .resume-library-stat,
body.dark-mode .resume-library-card,
body.dark-mode .resume-library-empty,
body.dark-mode .resume-library-search,
body.dark-mode .resume-library-sort,
body.dark-mode .resume-library-filters button,
body.dark-mode .resume-library-card-actions button{background:#1f2937;color:#f8fafc;border-color:#374151}
body.dark-mode .resume-library-filters button.active{background:#1e3a8a;color:#dbeafe;border-color:#3b82f6}
body.dark-mode .resume-card-badge{background:#334155;color:#e2e8f0}

@media(max-width:1100px){
    .resume-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .resume-library-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
    .resume-library-controls{grid-template-columns:1fr}
}

@media(max-width:680px){
    .resume-library-page{padding:0 16px;margin-top:22px}
    .resume-library-hero{flex-direction:column;padding:24px}
    .resume-library-hero .library-primary-button{width:100%}
    .resume-library-grid,.resume-library-stats{grid-template-columns:1fr}
    .resume-library-card-actions{grid-template-columns:1fr}
    .resume-library-card-actions .library-primary-button{grid-column:auto}
}

/* CareerPilot Resume Library Sticky Navigation Support v1.0 */
.resume-library-page {
    position: relative;
}


.resume-cleanup-notice {
    max-width: 1400px;
    margin: 0 auto 18px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--cp-border, #dbe3ee);
    border-radius: 16px;
    background: var(--cp-surface, #ffffff);
}

.resume-cleanup-notice[hidden] {
    display: none !important;
}

.resume-cleanup-notice strong {
    display: block;
    margin-bottom: 4px;
    color: var(--cp-text, #111827);
}

.resume-cleanup-notice p {
    margin: 0;
    color: var(--cp-text-soft, #64748b);
}

.resume-cleanup-notice button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--cp-primary, #2563eb);
    border-radius: 12px;
    background: var(--cp-primary, #2563eb);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.resume-cleanup-notice button:disabled {
    opacity: 0.65;
    cursor: wait;
}

@media (max-width: 760px) {
    .resume-cleanup-notice {
        align-items: flex-start;
        flex-direction: column;
    }

    .resume-cleanup-notice button {
        width: 100%;
    }
}
