/* HTML con tablas y controles Web Forms, siguiendo el ejemplo del curso.
   Colores y tipografía conservados del escritorio Lecturae. */
:root {
   --primary: #3b5b73;
   --text: #2f485c;
   --muted: #787878;
   --border: #dee2e7;
   --sidebar: #f4f6fd;
   --background: #f9fafe
}

* {
   box-sizing: border-box
}

body {
   margin: 0;
   background: var(--background);
   font-family: "Segoe UI", Arial, sans-serif;
   font-size: 14px;
   line-height: 1.5;
   color: var(--text)
}

h1,
h2,
p {
   margin: 0
}

table {
   border-collapse: collapse
}

input,
select,
button {
   font: inherit
}

a {
   color: var(--primary)
}

a:focus-visible,
input:focus-visible,
select:focus-visible {
   outline: 3px solid var(--primary);
   outline-offset: 3px
}

.skip-link {
   position: fixed;
   top: -100px;
   left: 16px;
   background: var(--primary);
   color: white;
   padding: 10px 18px;
   z-index: 5
}

.skip-link:focus {
   top: 12px
}

.layout-table {
   width: 1200px;
   max-width: 100%;
   margin: 0 auto;
   table-layout: fixed;
   min-height: 100vh;
   background: white
}

.menu-column {
   width: 212px
}

.header-cell {
   height: 72px;
   padding: 8px 22px;
   border-bottom: 1px solid var(--border);
   background: white
}

.header-table {
   width: 100%
}

.header-table td {
   vertical-align: middle
}

.brand-image {
   width: 55px
}

.brand-image img {
   display: block;
   width: 38px;
   height: 50px;
   object-fit: contain
}

.brand-name {
   font-size: 22px;
   font-weight: 700
}

.brand-name span {
   font-weight: 400;
   color: #8b9aa5;
   margin: 0 7px
}

.session-cell {
   width: 190px;
   text-align: right;
   font-size: 12px;
   color: var(--muted)
}

.session-cell strong {
   font-size: 14px;
   color: var(--text);
   font-weight: 600
}

.user-image {
   width: 52px;
   text-align: right
}

.user-image img {
   width: 38px;
   height: 38px;
   object-fit: contain;
   vertical-align: middle
}

.sidebar-cell {
   vertical-align: top;
   background: var(--sidebar);
   border-right: 1px solid #e9edf2;
   padding: 19px 18px
}

.menu-table {
   width: 100%
}

.menu-title {
   font-size: 12px;
   font-weight: 600;
   color: var(--muted);
   padding: 4px 4px 15px
}

.menu-button {
   width: 100%;
   min-height: 43px;
   margin: 0 0 7px;
   padding: 10px 12px;
   text-align: left;
   white-space: normal;
   border: 0;
   background: transparent;
   color: var(--primary);
   font-size: 13px;
   font-weight: 600;
   border-radius: 3px;
   cursor: pointer
}

.menu-button.selected {
   background: var(--primary);
   color: white
}

.menu-button.selected:hover {
   background: var(--text)
}

.menu-button:disabled {
   color: #657c90;
   cursor: default;
   opacity: 1
}

.menu-note {
   padding: 20px 5px 0;
   color: var(--muted);
   font-size: 11px;
   line-height: 1.6
}

.content-cell {
   vertical-align: top;
   background: var(--background);
   padding: 24px
}

.footer-cell {
   text-align: center;
   height: 30px;
   font-size: 11px;
   color: var(--muted);
   border-top: 1px solid #edf0f4;
   background: white
}

main {
   outline: none
}

.dashboard-table {
   width: 100%;
   table-layout: fixed
}

.heading-table {
   width: 100%;
   margin-bottom: 18px
}

.heading-table td {
   vertical-align: middle
}

.module-image {
   width: 62px
}

.module-image img {
   display: block;
   width: 46px;
   height: 59px;
   object-fit: contain
}

h1 {
   font-size: 25px;
   line-height: 1.25;
   font-weight: 700
}

.heading-table p {
   font-size: 13px;
   color: var(--muted);
   margin-top: 8px
}

.preview-notice {
   padding: 10px 13px;
   margin-bottom: 18px;
   background: #eef3f7;
   border: 1px solid #dce5ee;
   border-left: 3px solid var(--primary);
   font-size: 12px;
   color: #536d80;
   border-radius: 2px
}

.preview-notice strong {
   font-weight: 600
}

.filter-table {
   width: 100%;
   table-layout: fixed;
   margin-bottom: 14px
}

.filter-table td {
   padding: 0 8px 5px 0;
   vertical-align: bottom
}

.filter-table td:last-child {
   padding-right: 0
}

.filter-table tr:first-child {
   font-size: 12px;
   font-weight: 600
}

.filter-table td:nth-child(5),
.filter-table td:nth-child(6) {
   width: 90px
}

.input-field {
   width: 100%;
   height: 34px;
   padding: 5px 7px;
   border: 1px solid var(--border);
   background: white;
   color: var(--text);
   font-size: 12px;
   border-radius: 2px;
   opacity: 1;
   -webkit-text-fill-color: var(--text)
}

.button {
   height: 36px;
   padding: 0 14px;
   background: white;
   border: 1px solid var(--border);
   border-radius: 3px;
   color: var(--primary);
   font-size: 12px;
   font-weight: 600;
   cursor: pointer
}

.button.primary {
   background: var(--primary);
   color: white;
   border-color: var(--primary)
}

.button:disabled,
.aspNetDisabled .button,
.aspNetDisabled.button {
   opacity: .65;
   cursor: not-allowed
}

.filter-table .button {
   width: 100%;
   padding: 0 8px
}

.quick-actions {
   padding: 0 0 13px
}

.quick-actions .button {
   margin: 0 8px 5px 0
}

.stats-table {
   width: 100%;
   table-layout: fixed;
   border-collapse: separate;
   border-spacing: 10px 0;
   margin: 0 -10px;
   width: calc(100% + 20px)
}

.stats-table td {
   height: 140px;
   vertical-align: top;
   background: white;
   border: 1px solid #edf0f4;
   padding: 13px 14px;
   border-radius: 3px
}

.stats-table h2 {
   font-size: 12px;
   font-weight: 400;
   color: var(--muted)
}

.stat-number {
   font-size: 35px;
   font-weight: 600;
   color: var(--primary);
   line-height: 1.3;
   padding: 6px 0
}

.stats-table p:last-child {
   font-size: 11px;
   color: var(--muted)
}

.data-note {
   font-size: 11px;
   color: var(--muted);
   padding: 13px 0 15px
}

.panels-table {
   width: calc(100% + 14px);
   margin: 0 -7px 14px;
   table-layout: fixed;
   border-collapse: separate;
   border-spacing: 7px 0
}

.panels-table>tbody>tr>td {
   vertical-align: top;
   background: white;
   border: 1px solid #edf0f4;
   border-radius: 3px
}

.panels-table>tbody>tr>td:first-child {
   width: 56%
}

.panel {
   padding: 15px
}

.panel>h2 {
   font-size: 14px;
   font-weight: 600;
   margin-bottom: 15px
}

.empty-chart {
   height: 145px;
   text-align: center;
   padding-top: 60px;
   font-size: 12px;
   color: var(--muted);
   border-bottom: 1px solid var(--border);
   background: repeating-linear-gradient(white 0px, white 31px, #f2f4f7 31px, #f2f4f7 32px)
}

.data-table {
   width: 100%;
   font-size: 12px;
   text-align: left;
   border-collapse: collapse
}

.data-table th {
   background: #e2eaf0;
   color: var(--text);
   padding: 10px 9px;
   font-weight: 600;
   border-bottom: 1px solid var(--border)
}

.data-table td {
   padding: 12px 9px;
   border-bottom: 1px solid #edf0f3
}

.data-table .empty-row td {
   height: 80px;
   text-align: center;
   color: var(--muted)
}

.panel-note {
   font-size: 11px;
   color: var(--muted);
   margin-top: 12px
}

.load-status {
   font-size: 12px;
   color: var(--muted);
   padding: 2px 0 4px
}

@media(max-width:1000px) {
   .content-cell {
      padding: 20px 16px
   }

   .menu-column {
      width: 195px
   }

   .sidebar-cell {
      padding-left: 12px;
      padding-right: 12px
   }

   .brand-name {
      font-size: 20px
   }

   .filter-table .button {
      font-size: 11px
   }

   .filter-table td:nth-child(5),
   .filter-table td:nth-child(6) {
      width: 75px
   }

   .stats-table td {
      padding: 12px 9px
   }

   .stats-table h2 {
      font-size: 11px
   }

   .stats-table p:last-child {
      font-size: 10px
   }
}

@media(max-width:760px) {

   .layout-table,
   .layout-table>tbody,
   .layout-table>tbody>tr,
   .layout-table>tbody>tr>td {
      display: block;
      width: 100%
   }

   .layout-table>colgroup {
      display: none
   }

   .header-cell {
      height: auto;
      min-height: 72px;
      padding: 10px 14px
   }

   .brand-image {
      width: 40px
   }

   .brand-image img {
      width: 29px;
      height: 42px
   }

   .brand-name {
      font-size: 16px
   }

   .brand-name span {
      margin: 0 2px
   }

   .session-cell {
      width: 115px;
      font-size: 10px
   }

   .session-cell strong {
      font-size: 12px
   }

   .user-image {
      display: none
   }

   .sidebar-cell {
      padding: 12px 16px;
      border-right: 0;
      border-bottom: 1px solid var(--border)
   }

   .menu-table td {
      display: inline-block;
      width: 50%;
      vertical-align: top
   }

   .menu-table tr {
      display: inline
   }

   .menu-table td.menu-title {
      display: block;
      width: 100%;
      padding-bottom: 8px
   }

   .menu-button {
      min-height: 36px;
      font-size: 12px;
      margin-bottom: 2px
   }

   .menu-note {
      display: none !important
   }

   .content-cell {
      padding: 20px 14px
   }

   h1 {
      font-size: 22px
   }

   .heading-table p {
      font-size: 12px
   }

   .module-image {
      width: 49px
   }

   .module-image img {
      width: 35px;
      height: 46px
   }

   .filter-table {
      min-width: 570px
   }

   .aspNetDisabled {
      overflow-x: auto
   }

   .quick-actions .button {
      font-size: 11px;
      padding: 0 10px
   }

   .stats-table,
   .stats-table>tbody,
   .stats-table tr {
      display: block;
      width: 100%;
      margin: 0
   }

   .stats-table td {
      display: inline-block;
      width: calc(50% - 5px);
      margin-bottom: 10px;
      height: 130px
   }

   .stats-table td:nth-child(odd) {
      margin-right: 10px
   }

   .panels-table,
   .panels-table>tbody,
   .panels-table>tbody>tr {
      display: block;
      width: 100%;
      margin: 0
   }

   .panels-table>tbody>tr>td,
   .panels-table>tbody>tr>td:first-child {
      display: block;
      width: 100%;
      margin-bottom: 14px
   }

   .footer-cell {
      padding: 8px
   }
}

/* Formularios y mantenimientos: mismo patrón visual del escritorio. */
.page-description {
   color: var(--muted);
   font-size: 13px;
   margin: 8px 0 20px
}

.toolbar-table {
   width: 100%;
   margin: 16px 0;
   table-layout: auto
}

.toolbar-table td {
   padding: 0 10px 0 0;
   vertical-align: bottom
}

.toolbar-table td:first-child {
   width: 65%
}

.toolbar-table label {
   display: block;
   font-size: 12px;
   font-weight: 600;
   margin-bottom: 5px
}

.editor-panel {
   background: white;
   border: 1px solid var(--border);
   padding: 18px;
   margin: 18px 0
}

.editor-panel h2 {
   font-size: 18px;
   margin-bottom: 12px
}

.editor-table {
   width: 100%;
   table-layout: fixed
}

.editor-table td {
   padding: 8px 0;
   vertical-align: top
}

.editor-table .field-label {
   width: 170px;
   padding: 15px 16px 0 0;
   font-size: 13px;
   font-weight: 600
}

.editor-table textarea {
   height: auto;
   min-height: 90px;
   resize: vertical
}

.form-actions {
   padding-top: 18px !important
}

.form-actions .button,
.confirm-panel .button {
   margin-right: 8px
}

.danger {
   background: #a04141 !important;
   color: white !important;
   border-color: #a04141 !important
}

.confirm-panel {
   background: #fff5ef;
   border: 1px solid #e8c9bb;
   padding: 18px;
   margin: 16px 0
}

.confirm-panel p {
   margin-bottom: 14px
}

.message {
   display: block;
   padding: 12px 14px;
   margin: 15px 0;
   font-size: 13px;
   border: 1px solid var(--border)
}

.error {
   color: #813d3d;
   background: #fff1f1;
   border-color: #ebcece
}

.success {
   color: #315f44;
   background: #eff8f1;
   border-color: #cce3d1
}

.field-help {
   color: var(--muted);
   font-size: 12px;
   margin: 12px 0 17px
}

.table-scroll {
   overflow-x: auto
}

.data-table a {
   color: var(--primary);
   font-weight: 600
}

.data-table tr:nth-child(even) {
   background: #f7f9fa
}

.data-table .grid-pager td {
   padding: 10px
}

.grid-pager a,
.grid-pager span {
   padding: 5px 8px
}

.check-list {
   max-height: 180px;
   overflow: auto;
   border: 1px solid var(--border);
   padding: 9px;
   background: white
}

.check-list label {
   margin-left: 7px
}

.auth-body {
   background: #f4f6fd;
   padding: 50px 20px
}

.auth-layout {
   width: 1000px;
   max-width: 100%;
   margin: 0 auto;
   background: white;
   table-layout: fixed;
   border: 1px solid var(--border)
}

.auth-brand {
   width: 50%;
   background: #f5f7fa;
   text-align: center;
   vertical-align: middle;
   padding: 55px 35px
}

.auth-brand img {
   width: 225px;
   max-width: 80%;
   height: 250px;
   object-fit: contain
}

.auth-brand h1 {
   font-size: 25px;
   margin-top: 18px
}

.auth-brand p {
   color: var(--muted);
   font-size: 13px;
   margin-top: 10px
}

.auth-form {
   vertical-align: middle;
   padding: 45px 50px
}

.auth-form h2 {
   font-size: 24px;
   margin-bottom: 8px
}

.auth-form>p {
   color: var(--muted);
   font-size: 13px;
   margin-bottom: 18px
}

.auth-form .editor-table label {
   display: block;
   margin-bottom: 7px;
   font-size: 13px;
   font-weight: 600
}

.auth-form .input-field {
   height: 40px;
   background: #faf8f5
}

.auth-submit {
   width: 100%;
   height: 44px;
   margin-top: 12px
}

.auth-form a {
   font-size: 13px
}

.auth-footer {
   text-align: center;
   color: var(--muted);
   font-size: 11px;
   padding: 20px
}

.security-question {
   background: #eef3f7;
   padding: 14px;
   margin-top: 16px;
   font-weight: 600
}

@media(max-width:760px) {
   .auth-body {
      padding: 20px 12px
   }

   .auth-layout,
   .auth-layout>tbody,
   .auth-layout>tbody>tr,
   .auth-layout>tbody>tr>td {
      display: block;
      width: 100%
   }

   .auth-brand {
      padding: 20px
   }

   .auth-brand img {
      height: 120px;
      width: 130px
   }

   .auth-brand h1 {
      font-size: 20px;
      margin-top: 8px
   }

   .auth-brand p {
      margin-top: 5px
   }

   .auth-form {
      padding: 28px 24px
   }

   .auth-footer {
      padding: 15px
   }

   .editor-table .field-label {
      width: 110px;
      font-size: 12px;
      padding-right: 10px
   }

   .toolbar-table td:first-child {
      width: 55%
   }

   .toolbar-table .button {
      padding: 0 9px
   }

   .toolbar-table td {
      padding-right: 5px
   }
}

/* Circulacion, portal del lector y comprobantes. */
.link-button {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   text-decoration: none;
   vertical-align: middle;
   margin-bottom: 6px
}

.summary-strip {
   padding: 14px 16px;
   margin: 16px 0;
   background: #eef3f7;
   border-left: 3px solid var(--primary);
   font-size: 13px
}

.tabs {
   display: flex;
   flex-wrap: wrap;
   gap: 6px;
   margin: 20px 0;
   border-bottom: 1px solid var(--border);
   padding-bottom: 10px
}

.tabs a {
   padding: 9px 12px;
   border-radius: 3px;
   text-decoration: none;
   background: white;
   border: 1px solid var(--border);
   font-size: 12px
}

.tabs a.active {
   background: var(--primary);
   color: white;
   border-color: var(--primary)
}

h3 {
   font-size: 15px;
   margin: 18px 0 10px
}

.notice-card {
   padding: 18px;
   margin: 14px 0;
   border: 1px solid var(--border);
   background: white
}

.notice-card h3 {
   margin: 0 0 8px
}

.notice-card p {
   white-space: pre-line
}

.register-layout {
   max-width: 760px;
   background: white;
   border: 1px solid var(--border);
   padding: 30px;
   margin: auto
}

.register-layout>h1 {
   margin-top: 20px
}

.filter-panel {
   background: white;
   padding: 12px;
   margin-bottom: 16px
}

.filter-panel td {
   padding: 10px 12px
}

.filter-panel label {
   display: block;
   font-size: 12px;
   margin-bottom: 6px
}

.detail-text {
   height: auto !important;
   min-height: 120px
}

.chart-row {
   display: flex;
   align-items: center;
   gap: 10px;
   margin: 12px 0;
   font-size: 12px
}

.chart-row>span {
   width: 75px;
   flex-shrink: 0
}

.chart-row meter {
   flex: 1;
   min-width: 0;
   height: 22px;
   accent-color: var(--primary)
}

.chart-row strong {
   min-width: 25px;
   text-align: right
}

.requirements-met {
   color: #315f44
}

.receipt {
   background: white;
   padding: 22px;
   border: 1px solid var(--border);
   margin-top: 20px
}

.receipt h2 {
   margin-bottom: 12px
}

.data-table th {
   white-space: nowrap
}

.button:hover {
   filter: brightness(.96)
}

.menu-button:hover {
   background: #e2eaf0
}

.menu-button.selected:hover {
   background: var(--text)
}

.input-field:disabled {
   background: #eef0f3
}

.pnlEntrega {
   margin-top: 15px
}

@media(max-width:760px) {
   .register-layout {
      padding: 22px 16px
   }

   .toolbar-table,
   .toolbar-table>tbody,
   .toolbar-table tr {
      display: block;
      width: 100%
   }

   .toolbar-table td,
   .toolbar-table td:first-child {
      display: inline-block;
      width: auto;
      max-width: 100%;
      padding: 5px
   }

   .toolbar-table td:first-child {
      width: 100%;
      padding-left: 0
   }

   .editor-table.filter-panel,
   .filter-panel>tbody,
   .filter-panel tr,
   .filter-panel td {
      display: block;
      width: 100%
   }

   .tabs a {
      flex: 1 0 40%;
      text-align: center
   }

   .register-layout .editor-table,
   .register-layout .editor-table>tbody,
   .register-layout .editor-table tr,
   .register-layout .editor-table td {
      display: block;
      width: 100%
   }

   .register-layout .editor-table .field-label {
      width: 100%;
      padding: 8px 0 0
   }

   .receipt {
      padding: 14px
   }

   .chart-row>span {
      width: 60px
   }
}


.audit-detail {
   white-space: pre-wrap;
   overflow-wrap: anywhere;
   font: 13px/1.6 Consolas, monospace;
   padding: 12px;
   background: #f6f8fb;
   border: 1px solid var(--border)
}

.chart-row meter::-webkit-meter-bar {
   background: #e5ebf0;
   border: 0
}

.chart-row meter::-webkit-meter-optimum-value {
   background: var(--primary)
}

.chart-row meter::-moz-meter-bar {
   background: var(--primary)
}

/* Catalogo del estudiante: tarjetas con imagen referencial dibujada en CSS. */
.catalog-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr));
   gap: 16px;
   margin-top: 20px;
}

.book-card {
   display: flex;
   flex-direction: column;
   min-width: 0;
   padding: 14px;
   background: #f4f6fd;
   border: 1px solid #e6ebf3;
   border-radius: 4px;
   transition: border-color .15s, box-shadow .15s;
}

.book-card:hover {
   border-color: #c8d5e0;
   box-shadow: 0 5px 16px rgba(47, 72, 92, .07);
}

.book-card-cover {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 9px;
   min-height: 126px;
   background: #e2e7fc;
}

.book-card-icon {
   display: block;
   position: relative;
   width: 52px;
   height: 70px;
   background: var(--primary);
}

.book-card-icon::before {
   content: "";
   position: absolute;
   top: 0;
   bottom: 0;
   left: 8px;
   border-left: 2px solid #d8e5ed;
}

.book-card-icon::after {
   content: "";
   position: absolute;
   top: 21px;
   left: 19px;
   width: 23px;
   height: 2px;
   background: #d8e5ed;
   box-shadow: 0 9px 0 #d8e5ed;
}

.book-card-cover-caption {
   color: #657482;
   font-size: 10px;
}

.book-card-title {
   margin: 12px 0 15px;
   min-height: 40px;
   font-size: 15px;
   line-height: 1.35;
   overflow-wrap: anywhere;
}

.book-card-author {
   margin: 0 0 14px;
   min-height: 38px;
   color: var(--muted);
   font-size: 12px;
   line-height: 1.55;
   overflow-wrap: anywhere;
}

.book-card-category {
   margin-bottom: 8px;
   font-size: 12px;
   overflow-wrap: anywhere;
}

.book-card-edition {
   display: flex;
   flex-wrap: wrap;
   gap: 6px;
   color: var(--muted);
   font-size: 11px;
   overflow-wrap: anywhere;
}

.book-card-year::before {
   content: "· ";
}

.book-card-year:empty {
   display: none;
}

.book-card-actions {
   margin-top: auto;
   padding-top: 15px;
}

.book-card-availability {
   margin-bottom: 10px;
   font-size: 12px;
}

.book-card-button {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   text-decoration: none;
}

.book-card-button.aspNetDisabled {
   opacity: .55;
   cursor: not-allowed;
}

.catalog-pager {
   display: flex;
   align-items: center;
   flex-wrap: wrap;
   gap: 6px;
   margin: 24px 0 8px;
   font-size: 12px;
}

.catalog-page-link,
.catalog-current-page {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-width: 34px;
   height: 34px;
   padding: 0 10px;
   border: 1px solid var(--border);
   border-radius: 3px;
   background: white;
   text-decoration: none;
}

.catalog-current-page {
   border-color: var(--primary);
   background: var(--primary);
   color: white;
}

.catalog-empty {
   margin: 20px 0;
   padding: 30px 20px;
   border: 1px solid var(--border);
   background: white;
   color: var(--muted);
   text-align: center;
}

/* Ilustraciones originales de las pantallas de acceso del escritorio. */
.auth-brand.auth-scene-login {
   padding: 0 0 24px;
   background: #fff4e8;
}

.auth-scene-login .auth-scene-image {
   display: block;
   width: 100%;
   max-width: none;
   height: auto;
   aspect-ratio: 658 / 626;
   object-fit: cover;
   object-position: left center;
}

.auth-form-logo {
   display: block;
   width: 70px;
   height: 80px;
   margin: 0 auto 18px;
   object-fit: contain;
}

@media(max-width:760px) {
   .auth-scene-login .auth-scene-image {
      max-width: 360px;
      margin: 0 auto;
   }

}

/* Reportes de pago y QR de demostración. */
.yape-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.yape-fields { display: grid; gap: .5rem; align-content: start; }
.yape-qr { display: block; width: min(19rem, 100%); height: auto; }
.yape-datos dt { font-weight: 600; }
.yape-datos dd { margin: 0 0 .5rem; }
@media (max-width: 720px) { .yape-layout { grid-template-columns: 1fr; } }
