.library-body { color: #292822; background: #f6f3eb; }
.library-header { position: sticky; top: 0; z-index: 30; color: #fff; background: rgba(16,16,15,.97); border-bottom: 1px solid #343027; backdrop-filter: blur(14px); }
.library-topbar { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 26px; min-height: 88px; }
.library-brand img { width: 54px; height: 54px; border-radius: 13px; }
.library-brand strong { color: var(--gold-light); }
.library-brand small { color: #a9a69e; }
.library-nav { display: flex; align-items: center; gap: 7px; }
.library-nav a { padding: 9px 13px; border-radius: 999px; color: #b9b6ad; font-size: .82rem; font-weight: 750; text-decoration: none; }
.library-nav a:hover, .library-nav a.active { color: var(--gold-light); background: #28261f; }
.logout-form { margin: 0; }
.logout-form button { width: 42px; height: 42px; border: 1px solid #403d35; border-radius: 50%; color: #c8c3b6; background: transparent; font-size: .76rem; font-weight: 800; cursor: pointer; }
.logout-form button:hover { color: #fff; border-color: var(--gold-dark); }
.library-hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 82% 22%, rgba(211,173,74,.14), transparent 25%), var(--black); border-bottom: 1px solid #2e2a21; }
.library-hero::after, .curriculum-hero::after { content: ""; position: absolute; right: -100px; bottom: -230px; width: 430px; height: 430px; border: 1px solid rgba(211,173,74,.18); border-radius: 50%; box-shadow: 0 0 0 38px rgba(211,173,74,.025), 0 0 0 76px rgba(211,173,74,.018); }
.library-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.3fr) .7fr; align-items: end; gap: 80px; min-height: 390px; padding-block: 72px; }
.library-hero h1, .curriculum-hero h1 { max-width: 780px; margin: 0; color: var(--gold-light); font-family: var(--font-serif); font-size: clamp(2.6rem,5vw,4.8rem); font-weight: 400; line-height: 1.02; letter-spacing: -.04em; }
.library-hero p, .curriculum-hero p { max-width: 700px; margin: 21px 0 0; color: #b8b4aa; font-size: 1rem; }
.catalog-stats { display: grid; grid-template-columns: repeat(3,1fr); overflow: hidden; border: 1px solid #3b372d; border-radius: var(--radius); background: rgba(255,255,255,.025); }
.catalog-stats div { padding: 22px 14px; text-align: center; }
.catalog-stats div + div { border-left: 1px solid #3b372d; }
.catalog-stats strong, .catalog-stats span { display: block; }
.catalog-stats strong { color: var(--gold); font-family: var(--font-serif); font-size: 2.1rem; }
.catalog-stats span { margin-top: 5px; color: #969289; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.catalog-toolbar-wrap { position: sticky; top: 88px; z-index: 20; background: rgba(246,243,235,.95); border-bottom: 1px solid #e2dccd; backdrop-filter: blur(14px); }
.catalog-toolbar { display: grid; grid-template-columns: minmax(260px,1fr) 220px 190px auto; align-items: center; gap: 12px; min-height: 82px; }
.search-field, .select-field { display: flex; align-items: center; height: 48px; border: 1px solid #d8d0bd; border-radius: 13px; background: #fff; }
.search-field { gap: 10px; padding-inline: 15px; }
.search-field > span { color: var(--gold-dark); font-size: 1.4rem; }
.search-field input, .select-field select { width: 100%; height: 100%; border: 0; outline: 0; color: #37342c; background: transparent; }
.select-field select { padding-inline: 13px; cursor: pointer; }
.results-count { min-width: 90px; color: #7d7565; font-size: .76rem; font-weight: 800; text-align: right; }
.catalog-section, .curriculum-section { padding-block: 72px 86px; }
.content-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 30px; }
.content-heading h2 { margin: 0; font-family: var(--font-serif); font-size: clamp(2rem,4vw,3.15rem); font-weight: 400; letter-spacing: -.035em; }
.content-heading > p { max-width: 400px; margin: 0 0 7px; color: var(--muted); }
.pdf-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.pdf-card { display: grid; grid-template-columns: 126px minmax(0,1fr); min-height: 260px; overflow: hidden; border: 1px solid #e1dacb; border-radius: var(--radius); background: #fff; box-shadow: 0 7px 24px rgba(54,46,30,.055); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.pdf-card:hover { transform: translateY(-3px); border-color: #ccb66f; box-shadow: 0 15px 36px rgba(54,46,30,.11); }
.cover-wrap { min-height: 100%; overflow: hidden; background: #27251f; text-decoration: none; }
.cover-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cover-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 255px; padding: 15px; color: var(--gold); background: linear-gradient(145deg,#151514,#343127); text-align: center; }
.cover-placeholder::before { content: ""; width: 28px; height: 1px; margin-bottom: 18px; background: var(--gold-dark); }
.cover-placeholder small { color: #aaa69b; font-size: .58rem; font-style: normal; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.cover-placeholder strong { margin-block: 12px; font-family: var(--font-serif); font-size: 2rem; }
.cover-placeholder i { color: #8e897c; font-size: .66rem; font-style: normal; }
.pdf-card-body { display: flex; flex-direction: column; align-items: flex-start; padding: 19px 18px; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #898170; font-size: .66rem; }
.pdf-card h3, .external-card h3 { margin: 13px 0 5px; font-size: 1rem; line-height: 1.28; }
.pdf-card h3 a { text-decoration: none; }
.pdf-card h3 a:hover { color: var(--gold-dark); }
.card-author { margin: 0; color: #7b7467; font-size: .75rem; }
.card-description { display: -webkit-box; overflow: hidden; margin: 11px 0 15px; color: #6e685c; font-size: .76rem; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.text-link { margin-top: auto; color: #896713; font-size: .76rem; font-weight: 850; text-decoration: none; }
.text-link:hover { color: #4e3906; text-decoration: underline; }
.external-section, .thesis-guide { padding-block: 78px; color: #fff; background: var(--black-soft); }
.light-heading h2 { color: var(--gold-light); }
.light-heading > p { color: #9f9b91; }
.external-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.external-card { display: grid; grid-template-columns: 52px 1fr; gap: 15px; min-height: 205px; padding: 20px; border: 1px solid #38352c; border-radius: var(--radius); background: #20201d; }
.external-card:hover { border-color: #796529; background: #24231e; }
.external-logo { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #574b2a; border-radius: 14px; color: var(--gold-light); background: #2b281e; font-family: var(--font-serif); font-size: .9rem; font-weight: 700; }
.external-card h3 { color: #eeeadf; }
.external-card p { margin: 8px 0 16px; color: #a8a49a; font-size: .78rem; }
.external-card .text-link { color: var(--gold); }
.no-results { margin-top: 50px; margin-bottom: 70px; }
.academic-note { display: grid; grid-template-columns: auto 1fr; gap: 18px; margin-top: 62px; margin-bottom: 72px; padding: 25px; border: 1px solid #d9c788; border-radius: var(--radius); background: var(--gold-pale); }
.note-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: var(--gold-dark); font-family: var(--font-serif); font-weight: 800; }
.academic-note strong { color: #5e4815; }
.academic-note p { margin: 5px 0 0; color: #71684f; font-size: .82rem; }
.library-footer { margin-top: auto; color: #88847b; background: #0c0c0b; border-top: 1px solid #292720; font-size: .76rem; }
.library-footer .container { display: flex; justify-content: space-between; gap: 20px; padding-block: 24px; }

/* Login */
.login-body { color: #fff; background: #0c0c0b; }
.login-layout { display: grid; grid-template-columns: minmax(360px,.85fr) 1.15fr; min-height: 100vh; }
.login-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(30px,5vw,72px); background: radial-gradient(circle at 20% 75%,rgba(211,173,74,.16),transparent 28%), linear-gradient(145deg,#0d0d0c,#201f1a); }
.login-brand-panel::after { content: ""; position: absolute; left: -180px; bottom: -240px; width: 560px; height: 560px; border: 1px solid rgba(211,173,74,.15); border-radius: 50%; box-shadow: 0 0 0 48px rgba(211,173,74,.025),0 0 0 96px rgba(211,173,74,.018); }
.login-brand-panel > * { position: relative; z-index: 1; }
.login-brand-panel h1 { max-width: 560px; margin: 0; color: var(--gold-light); font-family: var(--font-serif); font-size: clamp(3rem,5vw,5.5rem); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.login-brand-panel p { max-width: 530px; color: #aaa69c; }
.login-brand-panel > small { color: #767269; letter-spacing: .1em; text-transform: uppercase; }
.login-form-panel { display: grid; place-items: center; padding: 36px; background: #f6f3eb; }
.login-card { width: min(100%,440px); padding: 38px; border: 1px solid #ded5c1; border-radius: var(--radius-lg); color: #27251f; background: #fff; box-shadow: 0 28px 70px rgba(27,24,17,.15); }
.login-seal { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 25px; border-radius: 18px; color: var(--gold-light); background: var(--black); font-family: var(--font-serif); font-weight: 800; }
.login-card h2 { margin: 0; font-family: var(--font-serif); font-size: 2rem; font-weight: 400; }
.login-card > p { margin: 8px 0 25px; color: var(--muted); font-size: .86rem; }
.form-field { display: block; margin-bottom: 16px; }
.form-field span { display: block; margin: 0 0 7px 3px; color: #5e594d; font-size: .75rem; font-weight: 800; }
.form-field input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid #d8d0bd; border-radius: 12px; outline: none; background: #fdfcf9; }
.form-field input:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(211,173,74,.15); }
.form-error { margin-bottom: 18px; padding: 11px 13px; border: 1px solid #edb4bd; border-radius: 10px; color: #81172a; background: #fff0f3; font-size: .78rem; }
.back-link { display: block; margin-top: 22px; color: #756d5c; font-size: .76rem; font-weight: 700; text-align: center; text-decoration: none; }

/* Plan de estudios */
.curriculum-hero { position: relative; overflow: hidden; padding-block: 72px 46px; color: #fff; background: radial-gradient(circle at 82% 10%,rgba(211,173,74,.13),transparent 24%), var(--black); }
.curriculum-hero .container { position: relative; z-index: 1; }
.curriculum-title-row { display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.program-badge { flex: 0 0 auto; margin-bottom: 8px; padding: 9px 14px; border: 1px solid #574c2d; border-radius: 999px; color: var(--gold-light); background: #25231c; font-size: .73rem; font-weight: 800; }
.subject-search-bar { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 40px; }
.subject-search-bar label { display: flex; align-items: center; gap: 11px; min-height: 58px; padding-inline: 19px; border: 1px solid #4a4432; border-radius: 15px; background: #1e1e1a; }
.subject-search-bar label > span:first-child { color: var(--gold); font-size: 1.4rem; }
.subject-search-bar input { width: 100%; border: 0; outline: 0; color: #fff; background: transparent; font-size: 1rem; }
.subject-search-bar input::placeholder { color: #848077; }
.subject-search-bar button { padding-inline: 19px; border: 1px solid #50482f; border-radius: 15px; color: var(--gold-light); background: #28261f; font-size: .76rem; font-weight: 800; cursor: pointer; }
.term-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.term-jump a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #39362c; border-radius: 50%; color: #a8a399; font-size: .74rem; font-weight: 800; text-decoration: none; }
.term-jump a:hover { color: #18160f; background: var(--gold); border-color: var(--gold); }
.terms { display: grid; gap: 12px; }
.term-panel { scroll-margin-top: 115px; overflow: hidden; border: 1px solid #dcd4c2; border-radius: var(--radius); background: #fff; box-shadow: 0 4px 16px rgba(47,42,30,.04); }
.term-panel > summary, .subject-panel > summary { cursor: pointer; list-style: none; }
.term-panel > summary::-webkit-details-marker, .subject-panel > summary::-webkit-details-marker { display: none; }
.term-panel > summary { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px; min-height: 96px; padding: 17px 22px; }
.term-panel[open] > summary { border-bottom: 1px solid #e3ddcf; background: #fcfaf5; }
.term-number { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; color: var(--gold-light); background: var(--black); font-family: var(--font-serif); font-size: 1.35rem; }
.term-name strong, .term-name small { display: block; }
.term-name strong { font-family: var(--font-serif); font-size: 1.28rem; font-weight: 500; }
.term-name small { margin-top: 4px; color: #8d8575; font-size: .72rem; }
.term-count { color: #837b6b; font-size: .72rem; font-weight: 800; }
.summary-toggle { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #d7cba9; border-radius: 50%; color: #8f6e19; font-size: 1.2rem; transition: transform .2s ease; }
.term-panel[open] .summary-toggle { transform: rotate(45deg); }
.subjects-list { display: grid; gap: 8px; padding: 12px; background: #f6f3eb; }
.subject-panel { overflow: hidden; border: 1px solid #e1dacb; border-radius: 14px; background: #fff; }
.subject-panel > summary { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; min-height: 74px; padding: 14px 18px; }
.subject-panel > summary:hover { background: #fdfbf6; }
.subject-panel > summary > span:first-child small, .subject-panel > summary > span:first-child strong { display: block; }
.subject-panel > summary small { color: #9b7a28; font-size: .64rem; font-weight: 850; letter-spacing: .08em; }
.subject-panel > summary strong { margin-top: 2px; color: #343129; font-size: .91rem; }
.subject-resource-count { color: #8a8274; font-size: .67rem; font-weight: 750; }
.subject-panel[open] > summary { border-bottom: 1px solid #e7e1d5; background: #fcfaf5; }
.subject-panel[open] > summary > span:last-child { transform: rotate(90deg); }
.subject-content { padding: 24px; }
.subject-description { max-width: 800px; margin: 0 0 28px; color: #696254; }
.subject-block + .subject-block { margin-top: 30px; padding-top: 25px; border-top: 1px solid #e7e1d5; }
.subject-block-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.subject-block-heading h3 { margin: 0; font-family: var(--font-serif); font-size: 1.18rem; font-weight: 500; }
.subject-block-heading span { color: #8a8272; font-size: .68rem; font-weight: 750; }
.compact-resource-grid, .compact-external-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.pdf-card-compact { grid-template-columns: 75px 1fr; min-height: 152px; border-radius: 13px; box-shadow: none; }
.pdf-card-compact .cover-placeholder { min-height: 150px; }
.pdf-card-compact .cover-placeholder strong { font-size: 1.25rem; }
.pdf-card-compact .pdf-card-body { padding: 13px; }
.pdf-card-compact h3 { margin-top: 9px; font-size: .82rem; }
.pdf-card-compact .card-meta > span:last-child { display: none; }
.external-card-compact { grid-template-columns: 42px 1fr; min-height: 160px; padding: 15px; border-color: #e1dacb; border-radius: 13px; color: #302d26; background: #fbfaf6; }
.external-card-compact:hover { background: #fff; border-color: #c9b46e; }
.external-card-compact .external-logo { width: 40px; height: 40px; }
.external-card-compact h3 { margin-top: 8px; color: #302d26; font-size: .86rem; }
.external-card-compact p { margin-block: 5px 11px; color: #777064; font-size: .71rem; }
.external-card-compact .text-link { color: #80600e; font-size: .69rem; }
.subject-empty { padding: 20px; border: 1px dashed #d2c59f; border-radius: 12px; color: #777064; background: #fcfaf5; font-size: .78rem; }
.bibliography-block ol { display: grid; gap: 8px; margin: 0; padding-left: 25px; color: #615b50; }
.bibliography-block li { padding-left: 6px; font-size: .79rem; }
.thesis-grid { display: grid; grid-template-columns: 1fr .8fr; align-items: center; gap: 90px; }
.thesis-grid h2 { margin: 0; color: var(--gold-light); font-family: var(--font-serif); font-size: clamp(2.1rem,4vw,3.4rem); font-weight: 400; }
.thesis-grid p { color: #a9a59b; }
.guide-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guide-list span { display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 12px; border: 1px solid #37342b; border-radius: 13px; color: #d2cec3; font-size: .76rem; }
.guide-list b { color: var(--gold); font-family: var(--font-serif); font-size: 1.2rem; }

@media (max-width: 1050px) { .pdf-grid { grid-template-columns: repeat(2,1fr); } .external-grid { grid-template-columns: repeat(2,1fr); } .catalog-toolbar { grid-template-columns: 1fr 210px 180px; padding-block: 14px; } .results-count { grid-column: 1/-1; text-align: left; } .compact-resource-grid, .compact-external-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 820px) { .library-topbar { grid-template-columns: 1fr auto; gap: 12px; } .library-nav { grid-row: 2; grid-column: 1/-1; overflow-x: auto; padding-bottom: 12px; } .logout-form { grid-column: 2; grid-row: 1; } .catalog-toolbar-wrap { top: 130px; } .library-hero-grid { grid-template-columns: 1fr; gap: 36px; } .content-heading, .curriculum-title-row { align-items: flex-start; flex-direction: column; } .login-layout { grid-template-columns: 1fr; } .login-brand-panel { min-height: 420px; } .thesis-grid { grid-template-columns: 1fr; gap: 35px; } }
@media (max-width: 650px) { .library-brand strong { font-size: .88rem; } .library-brand small { font-size: .66rem; } .library-brand img { width: 46px; height: 46px; } .library-topbar { min-height: 75px; } .library-nav a { white-space: nowrap; font-size: .75rem; } .catalog-toolbar-wrap { position: relative; top: 0; } .catalog-toolbar { grid-template-columns: 1fr; } .results-count { grid-column: auto; } .library-hero-grid { min-height: 0; padding-block: 58px; } .catalog-stats { grid-template-columns: 1fr; } .catalog-stats div + div { border-left: 0; border-top: 1px solid #3b372d; } .catalog-section, .curriculum-section { padding-block: 52px; } .content-heading { align-items: flex-start; flex-direction: column; gap: 10px; } .pdf-grid, .external-grid, .compact-resource-grid, .compact-external-grid { grid-template-columns: 1fr; } .pdf-card { grid-template-columns: 105px 1fr; min-height: 220px; } .cover-placeholder { min-height: 220px; } .login-form-panel { padding: 18px; } .login-card { padding: 25px; } .login-brand-panel { min-height: 380px; } .subject-search-bar { grid-template-columns: 1fr; } .term-panel > summary { grid-template-columns: auto 1fr auto; gap: 12px; padding: 14px; } .term-count { display: none; } .term-number { width: 46px; height: 46px; } .subject-panel > summary { grid-template-columns: 1fr auto; } .subject-resource-count { display: none; } .subject-content { padding: 17px; } .subject-block-heading { flex-direction: column; gap: 3px; } .guide-list { grid-template-columns: 1fr; } .library-footer .container { flex-direction: column; } }
