﻿/* Shared Admin UI v1 */
body:has(.admin-shell) { background-image: none; background-color: #f4f6f8; padding-top: 0; }
.admin-shell { min-height: 100vh; display: flex; background: #f4f6f8; color: #212529; }
.admin-sidebar { width: 248px; flex: 0 0 248px; min-height: 100vh; position: sticky; top: 0; align-self: flex-start; display: flex; flex-direction: column; padding: 1.5rem 1rem; background: #1f2937; border-right: 1px solid #111827; color: #fff; }
.admin-brand { color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: .01em; text-decoration: none; padding: 0 .65rem 1.25rem; }
.admin-nav { display: flex; flex-direction: column; gap: .2rem; }
.admin-nav-heading { color: #9ca3af; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 1rem .65rem .35rem; }
.admin-nav-link { min-height: 40px; display: flex; align-items: center; border-radius: .45rem; color: #d1d5db; padding: .55rem .75rem; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.admin-nav-link:hover { color: #fff; background: #374151; }
.admin-nav-link.active { color: #fff; background: #2563eb; box-shadow: inset 3px 0 0 #93c5fd; font-weight: 600; }
.admin-main { min-width: 0; flex: 1; }
.admin-page { max-width: 1500px; margin: 0 auto; padding: 1.75rem 2rem 2.5rem; }
.admin-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.admin-page-header h1 { margin: 0; color: #111827; font-size: 1.65rem; font-weight: 700; line-height: 1.3; }
.admin-page-header p { margin: .35rem 0 0; color: #6b7280; font-size: .92rem; }
.admin-page .card { border: 1px solid #e2e8f0; border-radius: .7rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); overflow: hidden; }
.admin-page .card-header { background: #fff; border-bottom: 1px solid #e5e7eb; color: #374151; font-weight: 600; padding: .85rem 1.1rem; }
.admin-page .card-body { padding: 1.1rem; }
.admin-page .form-label { color: #374151; font-size: .84rem; font-weight: 600; margin-bottom: .35rem; }
.admin-page .form-control, .admin-page .form-select { min-height: 38px; border-color: #d1d5db; border-radius: .45rem; font-size: .9rem; }
.admin-page .form-control:focus, .admin-page .form-select:focus { border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12); }
.admin-page .btn { border-radius: .45rem; font-size: .875rem; font-weight: 600; padding: .42rem .75rem; }
.admin-page .btn-sm { padding: .3rem .55rem; font-size: .8rem; }
.admin-page .table-responsive { border: 1px solid #e2e8f0; border-radius: .7rem; background: #fff; }
.admin-page .table { margin-bottom: 0; min-width: 760px; }
.admin-page .table > :not(caption) > * > * { border-color: #edf0f3; padding: .75rem; vertical-align: middle; }
.admin-page .table > thead > tr > th { background: #f8fafc; color: #475569; font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.admin-page .table tbody tr:hover { background: #f8fbff; }
.level-drag-column { width: 72px; text-align: center; }
.level-drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid #cbd5e1; border-radius: .35rem; color: #64748b; cursor: grab; font-size: 1.35rem; font-weight: 700; line-height: 1; user-select: none; }
.level-drag-handle:hover { background: #f1f5f9; color: #334155; }
.level-drag-handle:active { cursor: grabbing; }
.level-drag-handle.is-disabled { cursor: not-allowed; opacity: .5; }
.level-drag-handle.is-disabled:hover { background: transparent; color: #64748b; }
.level-dragging { opacity: .45; }
.level-drop-target > * { border-top: 2px solid #2563eb !important; }
.category-drag-column { width: 72px; text-align: center; }
.category-drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid #cbd5e1; border-radius: .35rem; color: #64748b; cursor: grab; font-size: 1.35rem; font-weight: 700; line-height: 1; user-select: none; }
.category-drag-handle:hover { background: #f1f5f9; color: #334155; }
.category-drag-handle:active { cursor: grabbing; }
.category-drag-handle.is-disabled { cursor: not-allowed; opacity: .5; }
.category-drag-handle.is-disabled:hover { background: transparent; color: #64748b; }
.category-status-switch { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.category-status-switch:hover:not(:disabled) { border-color: #198754; }
.category-status-switch:checked { background-color: #198754; border-color: #198754; }
.category-status-switch:focus { border-color: #75b798; box-shadow: 0 0 0 .25rem rgba(25, 135, 84, .25); }
.category-status-switch:disabled { cursor: not-allowed; opacity: .55; }
.category-status-switch:disabled + .form-check-label { opacity: .65; }
.publication-status-switch { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.publication-status-switch:hover:not(:disabled) { border-color: #198754; }
.publication-status-switch:checked { background-color: #198754; border-color: #198754; }
.publication-status-switch:focus { border-color: #75b798; box-shadow: 0 0 0 .25rem rgba(25, 135, 84, .25); }
.publication-status-switch:disabled { cursor: not-allowed; opacity: .55; }
.publication-status-switch:disabled + .form-check-label { opacity: .65; }
.category-dragging { opacity: .45; }
.category-drop-before > * { border-top: 2px solid #2563eb !important; }
.category-drop-after > * { border-bottom: 2px solid #2563eb !important; }
.publication-drag-column { width: 72px; text-align: center; }
.publication-drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid #cbd5e1; border-radius: .35rem; color: #64748b; cursor: grab; font-size: 1.35rem; font-weight: 700; line-height: 1; user-select: none; }
.publication-drag-handle:hover { background: #f1f5f9; color: #334155; }
.publication-drag-handle:active { cursor: grabbing; }
.publication-drag-handle.is-disabled { cursor: not-allowed; opacity: .5; }
.publication-drag-handle.is-disabled:hover { background: transparent; color: #64748b; }
.publication-dragging { opacity: .45; }
.publication-drop-before > * { border-top: 2px solid #2563eb !important; }
.publication-drop-after > * { border-bottom: 2px solid #2563eb !important; }
.admin-page .alert { border-radius: .6rem; margin-bottom: 1rem; }
.admin-toast-container { position: fixed; z-index: 1080; top: 1rem; right: 1rem; display: flex; flex-direction: column; gap: .65rem; width: min(420px, calc(100vw - 2rem)); pointer-events: none; }
.admin-toast { display: flex; align-items: flex-start; gap: .75rem; margin: 0; box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .18); pointer-events: auto; }
.admin-toast-message { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.admin-toast .btn-close { flex: 0 0 auto; }
.admin-status-badge { display: inline-flex; align-items: center; border-radius: 999px; font-size: .75rem; font-weight: 700; padding: .25rem .55rem; white-space: nowrap; }
.admin-status-badge.is-active { background: #dcfce7; color: #166534; }
.admin-status-badge.is-inactive { background: #f1f5f9; color: #475569; }
.admin-status-badge.is-online { background: #dbeafe; color: #1d4ed8; }
.admin-status-badge.is-offline { background: #fef3c7; color: #92400e; }
.online-upload-progress { min-width: 0; margin-top: .5rem; }
.online-upload-progress .progress { height: .45rem; }
.online-upload-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 600; }
.admin-empty { border: 1px dashed #cbd5e1; border-radius: .7rem; background: #fff; color: #64748b; padding: 2.5rem 1rem; text-align: center; }
@media (max-width: 767.98px) { .admin-shell { display: block; } .admin-sidebar { width: auto; min-height: auto; position: static; padding: 1rem; } .admin-brand { display: block; padding: 0 0 .75rem; } .admin-nav { flex-flow: row wrap; gap: .4rem; } .admin-nav-heading { display: none; } .admin-nav-link { min-height: 36px; border: 1px solid #4b5563; padding: .4rem .6rem; } .admin-sidebar form { margin-top: .75rem; padding-top: .75rem; } .admin-page { padding: 1.25rem 1rem 2rem; } .admin-page-header { margin-bottom: 1.1rem; } .admin-page-header h1 { font-size: 1.4rem; } .admin-page .card-body { padding: 1rem; } }
/* Issue Admin card list */
.issue-card-list { display: grid; gap: .7rem; }
.issue-admin-card { margin: 0; }
.issue-card-header { display: flex; align-items: center; gap: .65rem; cursor: pointer; user-select: none; }
.issue-card-header:hover { background: #f8fafc; }
.issue-card-header:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: -3px; }
.issue-card-leading { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-start; gap: .65rem; min-width: 0; text-align: left; }
.issue-card-toggle { flex: 0 0 1.75rem; color: #64748b; font-size: 1.4rem; line-height: 1; text-align: center; }
.issue-card-summary { min-width: 0; flex: 0 1 auto; }
.issue-card-title { margin: 0; color: #1f2937; font-size: 1.1rem; font-weight: 700; }
.issue-card-meta { margin: .25rem 0 0; color: #64748b; font-size: .86rem; }
.issue-card-badges { display: flex; flex: 0 0 auto; align-items: center; gap: .4rem; margin-left: auto; }
.issue-dirty-badge { border-radius: 999px; background: #fef3c7; color: #92400e; font-size: .75rem; font-weight: 700; padding: .25rem .55rem; white-space: nowrap; }
.issue-card-body { display: grid; gap: .9rem; padding: .85rem !important; }
.issue-edit-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, .65fr) minmax(0, .6fr) minmax(0, .85fr) minmax(0, 1.1fr); gap: .7rem; align-items: end; min-width: 0; }
.issue-field-bookcode, .issue-field-range, .issue-field-year, .issue-field-month, .issue-field-status, .issue-check-field { min-width: 0; }
.issue-range-inputs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .45rem; }
.issue-range-inputs > span { color: #64748b; font-size: .85rem; }
.issue-check-field { grid-column: 6; min-height: 38px; display: flex; align-items: center; }
.issue-check-field .form-check { margin: 0; white-space: nowrap; }
.issue-save-field { grid-column: 1 / -1; min-height: 38px; display: flex; align-items: center; justify-content: flex-end; margin-top: .2rem; }
.issue-save-field .btn { min-width: 88px; white-space: nowrap; }
.issue-audio-section { border-top: 1px solid #e5e7eb; padding-top: .85rem; }
.issue-section-heading { margin: 0 0 .55rem; color: #374151; font-size: .9rem; font-weight: 700; }
.issue-audio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.issue-audio-panel { min-width: 0; border: 1px solid #e2e8f0; border-radius: .55rem; background: #f8fafc; padding: .7rem; }
.issue-audio-panel h4 { margin: 0 0 .5rem; color: #475569; font-size: .82rem; font-weight: 700; }
.issue-audio-cell { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.issue-audio-current { display: flex; align-items: center; gap: .5rem; min-width: 0; white-space: nowrap; }
.issue-audio-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; flex: 1 1 auto; }
.issue-audio-delete { flex: 0 0 auto; white-space: nowrap; }
.issue-audio-input { width: 100%; max-width: 100%; min-width: 0; }
.issue-create-primary-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; align-items: end; }
.issue-create-field-bookcode { grid-column: span 3; min-width: 0; }
.issue-create-field-issue-start { grid-column: span 3; min-width: 0; }
.issue-create-field-issue-end, .issue-create-field-year, .issue-create-field-month { grid-column: span 2; min-width: 0; }
.issue-create-card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.issue-create-header-switch { display: flex; flex: 0 0 auto; align-items: center; gap: .5rem; margin: 0; padding: 0; }
.issue-create-header-switch .form-check-input { flex: 0 0 auto; margin: 0; }
.issue-create-action { display: flex; justify-content: flex-end; margin-top: 1rem; }
.issue-create-action .btn { min-width: 88px; }
.issue-create-files-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.issue-create-progress { border-top: 1px solid #e5e7eb; margin-top: 1rem; padding-top: .85rem; }
.issue-create-upload-row { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); align-items: start; gap: .65rem; }
.issue-create-upload-row + .issue-create-upload-row { margin-top: .65rem; }
.issue-create-upload-row > strong { color: #475569; font-size: .82rem; padding-top: .5rem; }
.online-content-card-list { display: grid; gap: .7rem; }
.online-content-card { margin: 0; }
.online-content-card.online-content-dragging { opacity: .55; }
.online-content-card.online-content-drop-target { border-top: 3px solid #2563eb; }
.online-content-drag-handle { display: inline-block; padding: .1rem .25rem; border-radius: .25rem; color: #64748b; cursor: grab; user-select: none; font-weight: 700; }
.online-content-drag-handle[draggable="false"] { cursor: not-allowed; opacity: .45; }
.online-content-drag-handle:active { cursor: grabbing; }
.online-content-card.is-dirty { border-color: #f0c36d; }
.online-content-card-header { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; border: 0; border-bottom: 1px solid transparent; color: inherit; text-align: left; cursor: pointer; user-select: none; }
.online-content-card-header:hover { background: #f8fafc; }
.online-content-card-header:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: -3px; }
.online-content-drag-placeholder { align-self: center; box-sizing: border-box; flex: 0 0 36px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #cbd5e1; border-radius: 6px; color: #94a3b8; font-size: 1rem; letter-spacing: -.2em; line-height: 1; }
.online-content-card-left { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; gap: .2rem; min-width: 0; }
.online-content-card-title { display: block; max-width: 100%; overflow-wrap: anywhere; color: #1f2937; font-size: 1rem; font-weight: 600; line-height: 1.25; }
.online-content-card-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .4rem; }
.online-content-dirty-indicator { color: #92400e; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.online-content-toggle { flex: 0 0 1.5rem; color: #64748b; font-size: 1.25rem; line-height: 1; text-align: center; }
.online-content-file-statuses { display: flex; flex-wrap: wrap; gap: .6rem; min-width: 0; max-width: 100%; margin: 0; color: #64748b; font-size: .875rem; }
.online-content-file-status { display: inline-flex; align-items: center; gap: .28rem; }
.online-content-file-status-icon { font-size: .95rem; font-weight: 700; line-height: 1; }
.online-content-file-status.has-file { color: #15803d; }
.online-content-file-status.no-file { color: #94a3b8; }
.online-content-card-body { display: grid; gap: .8rem; padding: .8rem !important; }
.online-content-section-heading { margin: 0 0 .45rem; color: #374151; font-size: 1rem; font-weight: 600; }
.online-content-basic-grid { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(8rem, 1fr); gap: .55rem; align-items: end; }
.online-content-save-row { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; margin-top: .55rem; }
.online-content-dirty-hint { margin-right: auto; color: #92400e; font-size: .78rem; }
.online-content-files-section { border-top: 1px solid #e5e7eb; padding-top: .7rem; }
.online-content-files-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.online-content-file-panel { min-width: 0; border: 1px solid #e2e8f0; border-radius: .55rem; background: #f8fafc; padding: .6rem; }
.online-content-file-panel h3 { margin: 0 0 .4rem; color: #475569; font-size: .82rem; font-weight: 600; text-transform: capitalize; }
@media (max-width: 991.98px) { .online-content-files-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .online-content-card-actions { gap: .3rem; } .online-content-basic-grid, .online-content-files-grid { grid-template-columns: 1fr; } .online-content-save-row { align-items: flex-start; flex-direction: column; } .online-content-dirty-hint { margin-right: 0; } }
@media (max-width: 991.98px) { .issue-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .issue-field-range { grid-column: span 2; } .issue-check-field { grid-column: auto; } .issue-save-field { grid-column: 1 / -1; } .issue-create-primary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .issue-create-field-bookcode, .issue-create-field-issue-start { grid-column: span 3; } .issue-create-field-issue-end, .issue-create-field-year, .issue-create-field-month { grid-column: span 2; } }
@media (max-width: 767.98px) { .issue-create-primary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .issue-create-field-bookcode { grid-column: span 2; } .issue-create-field-issue-start, .issue-create-field-issue-end, .issue-create-field-year, .issue-create-field-month { grid-column: span 1; } }
@media (max-width: 575.98px) { .issue-card-header { align-items: flex-start; } .issue-card-badges { flex-wrap: wrap; justify-content: flex-end; } .issue-edit-grid, .issue-create-primary-grid, .issue-create-files-grid, .issue-audio-grid { grid-template-columns: minmax(0, 1fr); } .issue-field-range { grid-column: auto; } .issue-save-field { grid-column: 1 / -1; } .issue-create-field-bookcode, .issue-create-field-issue-start, .issue-create-field-issue-end, .issue-create-field-year, .issue-create-field-month { grid-column: auto; } .issue-create-card-header { align-items: flex-start; } }
