/* Custom semantic elements */

brand {
    xdisplay: block;
    font-size: 1.25rem;
    font-weight: 600;
}
brand>a{text-decoration:none;}
brand>a>span{
    font-size: 1.1rem;
    color: black;
    white-space: nowrap;
}
brand>a{
    display: flex;
    align-items: center;
    gap: 1rem;
}
brand>a>logo{
    display: block;
    flex-shrink: 0;
    width: 28px;
    height: 36px;
}
brand>a>logo>svg{
    width: 100%;
    height: 100%;
}

menu {
  xmax-height: 2.2em; /* todo: block wrapping - might cause problems*/
  list-style: none;           /* Remove bullets */
  margin: 0;                  /* Remove margins */
  padding: 0;                 /* Remove padding */
  display: flex;              /* or however you want to layout menu items */
}

menu>a{
    margin-left:1em;
    text-decoration:none;
    color:black;
}
menu>a:hover{
    text-decoration:underline;
}
menu>a.button{
    padding: 0.25rem 0.75rem !important;
    font-size: 0.85rem;
    line-height: 1.2;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

container {
    display: block;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1rem;
}

toolbar {
    display: block;
    padding: 1rem 0;
}

notifications, breadcrumbs, columns {
    display: block;
}

:root {
  --btn-cta-color: #B53A3C; /* #A16348; */   /*color of edge of page in bible*/
  --btn-cta-hover: #3AB53C;  /*#A16348;*/ /* #B3826C; */   
}


body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;  /* Full viewport height */
}

body::before { /* site background image */
  background-image: url('/Assets/img/background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;  /* Optional: keeps image fixed while scrolling */
    
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Optional: reinforces stationary effect */
  z-index: -1; /* Keeps it behind content */

  filter: blur(8px);     /* adjust blur strength */
  transform: scale(1.05);/* avoids seeing sharp edges after blur */
  background-color: rgba(255, 255, 255, 0.2); /* faint white wash */
  background-blend-mode: screen;              /* lightens highlights */
}

body>header{
  background-color: rgba(255, 255, 255, 0.6); /*  white wash */
  background-blend-mode: screen;              /* lightens highlights */
  border-bottom: 1px solid silver;
  padding:4px;
}

body>footer{
  background-color: rgba(255, 255, 255, 0.6); 
  background-blend-mode: screen;              
}

main {
  flex: 1;  /* Takes all available space */
}

footer {
  padding: 1rem 0;
}

footer container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

footer p {
  margin-bottom: 0;
}

header.hero{
    background-color: rgba(255, 255, 255, 0.6);
    border-radius:12px;
    padding:1em;
    margin-bottom:1em;
    display: flex;
    align-items: flex-start;
    gap: 2em;
}

header.hero>.picture {
  background-image: url('/Assets/img/hero.jpg');
  background-size: cover;
  background-position: center;
    width: 300px;
    height: 300px;
    flex-shrink: 0;
}

section{
    background-color: rgba(255, 255, 255, 0.6);
    border-radius:12px;
    padding:1em;
}

.button,
.button.button,
a.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--btn-cta-color);  /* orange */
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 1.125rem;  /* large equivalent */
}

.button:hover,
.button.button:hover,
a.button:hover {
  background-color: var(--btn-cta-hover);
}


body>header a.cta {padding: 0.25rem 0.5rem; white-space: nowrap;}

.grid{
  display: grid; /* Pico already does this, but it's fine to repeat */
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  grid-auto-rows: 1fr; /* make all items in the grid the same height */
}
div.grid>article.box{
    border:1px solid white;
    background:rgba(255,255,255,0.3);
}

a.is-info{
    border:1px solid black;
    background-color:transparent;
    color:black;
}

div.card{
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    margin-top: 1em;
    padding:1em;
}

div.grid>div.box{
    background-color: transparent;
    border: 1px solid white;
    margin: 1em;
    padding: 1em;
    border-radius: 12px;
}

section>article , section>article>article{
    background-color:transparent;
    
    border: 1px solid white;
    border-radius: 12px;
}
div.tag{
    background-color:white;
    border-radius:4px;
    display: inline-block;
    font-weight:bold;
    padding:2px;
    margin:4px;
}
article.box, article.card{
    background-color:transparent;
    border:1px solid white;
    border-radius:12px;
}
article>div>div.is-narrow{
    float: left;
    font-size: 2em;
    font-weight: bold;
    margin-right: 18px;
}

/* Responsive Flexbox Menu Styles */

/* Desktop (> 768px): Menu items flow horizontally */
@media (min-width: 769px) {
    header nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    header nav > menu {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        margin-left: auto;
    }
    
    header nav > menu > a {
        margin-left: 1em;
    }
}

/* Mobile (≤ 768px): Menu items stack vertically below logo */
@media (max-width: 768px) {
    header nav {
        display: flex;
        flex-direction: column;
    }

    brand>a {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    brand>a>logo {
        width: 100%;
        max-width: 320px;
        height: 40px;
    }

    brand>a>span {
        display: none;
    }

    header nav > menu {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 1rem;
        gap: 0.5rem;
    }

    header nav > menu > a {
        width: calc(50% - 2rem);
        box-sizing: border-box;
        padding: 0.75rem 0.5rem;
        background-color: rgba(255, 255, 255, 0.5);
        border-radius: 4px;
        text-align: center;
        border-bottom: none;
    }

    header nav > menu > a:hover {
        background-color: var(--pico-primary);
        color: white;
        text-decoration: none;
        padding-left: 0.5rem;
    }

    /* Hero section: stack vertically on mobile */
    header.hero {
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }

    header.hero>.picture {
        width: 100%;
        max-width: 300px;
        height: 300px;
    }

    /* Footer: stack vertically on mobile */
    footer container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
}

/* Hide delete buttons on study cards to make entire card clickable */
.delete-study-btn {
    display: none !important;
}

/* Single study page: keep action items (Edit/Send Now/Restart/Delete) side-by-side */
.study-action-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding-bottom:0; margin-bottom:0;
}
.card-footer-item{margin:0; padding:0;}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-actions .button,
.form-actions button,
.form-actions a.button {
    width: auto;
}

.study-action-items > a.card-footer-item,
.study-action-items > .card-footer-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.study-action-items > .card-footer-item form {
    width: 100%;
}

.study-action-items > .card-footer-item form button {
    width: 100%;
    white-space: nowrap;
}

@media (max-width: 768px) {
    footer.study-action-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    footer.study-action-items {
        grid-template-columns: 1fr;
    }
}

/* Profile Tabs - Horizontal Button Layout */
.profile-tabs-list {
    display: flex !important;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    list-style: none;
    background: none;
}

.profile-tabs-list li {
    list-style: none;
    background: none;
    padding: 0;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.profile-tabs-list li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-tabs-list li a span {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.profile-tabs-list li a .icon {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

/* Active Tab - Dark Button Styling */
.profile-tabs-list li.is-active a {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-color: #2c3e50;
    box-shadow: 0 4px 8px rgba(44, 62, 80, 0.3);
    transform: translateY(-1px);
}

.profile-tabs-list li.is-active a:hover {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(44, 62, 80, 0.4);
}

/* Inactive Tabs - Light Button Styling */
.profile-tabs-list li:not(.is-active) a {
    background: rgba(255, 255, 255, 0.8);
    color: #555;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.profile-tabs-list li:not(.is-active) a:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive - Stack to 2 columns on small screens */
@media (max-width: 768px) {
    .profile-tabs-list {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .profile-tabs-list li {
        flex: 1 1 calc(50% - 0.375rem);
        min-width: calc(50% - 0.375rem);
    }
    
    .profile-tabs-list li a {
        font-size: 0.8rem;
        padding: 0.6rem 0.4rem;
        min-height: 3.5rem;
    }
}

/* Very small screens - single column */
@media (max-width: 480px) {
    .profile-tabs-list li {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .profile-tabs-list li a {
        font-size: 0.9rem;
        padding: 0.8rem 0.5rem;
        min-height: 3rem;
    }
}

.is-hidden {
    display: none !important;
}

.is-visible {
    display: block;
}

.spinner-hidden {
    display: none;
}

.results-box,
.results-box-large {
    margin-top: 0.5rem;
    padding: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 4px;
    background-color: var(--bg-color, #fff);
}

.results-box-large {
    max-height: 300px;
}

input[type="radio"]:not(:checked) ~ span,
input[type="radio"]:not(:checked) ~ span span {
    color: black;
}

#schedule-field{position:relative;} /* hack */
div.smallbtn>a{font-size:1em; background-color:transparent} /* hack */
div.pushright{position:absolute; right:1em;} /* hack */

#topic-results, #collection-list {border: 1px solid black; border-radius:8px;}

/* Focused UI profile: Focused Times tab - make "Edit Focused Times" match other profile buttons */
.profile-tabs + .tab-content #tab-focused-times.is-active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-tabs + .tab-content #tab-focused-times > .level {
    display: contents;
}

.profile-tabs + .tab-content #tab-focused-times .level-left {
    order: 0;
}

.profile-tabs + .tab-content #tab-focused-times .focused-times-table,
.profile-tabs + .tab-content #tab-focused-times .notification {
    order: 1;
}

.profile-tabs + .tab-content #tab-focused-times .level-right {
    order: 2;
    width: 100%;
    margin-left: 0 !important;
    justify-content: flex-start;
}

.profile-tabs + .tab-content #tab-focused-times .level-right .level-item {
    width: 100%;
    justify-content: flex-start;
}

.profile-tabs + .tab-content #tab-focused-times .level-right a.button,
.profile-tabs + .tab-content #tab-focused-times .level-right button.button {
    display: inline-block;
    width: fit-content;
    background-color: transparent;
    border: 1px solid black;
    color: black;
}

.profile-tabs + .tab-content #tab-focused-times .level-right a.button:hover,
.profile-tabs + .tab-content #tab-focused-times .level-right button.button:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: black;
    color: black;
}

/* FORCE relative positioning on all verse picker containers */
div.reference-field{position: relative;}

/* Notification card footer - keep action buttons (Edit/View/History/Delete) side-by-side */
footer.card-footer.is-large-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
}

footer.card-footer.is-large-buttons > a.card-footer-item,
footer.card-footer.is-large-buttons > .card-footer-item {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

footer.card-footer.is-large-buttons > .card-footer-item form {
    width: 100%;
    display: flex;
    margin: 0;
}

footer.card-footer.is-large-buttons > .card-footer-item form button {
    width: 100%;
    white-space: nowrap;
}

@media (max-width: 768px) {
    footer.card-footer.is-large-buttons {
        flex-direction: column;
    }
    
    footer.card-footer.is-large-buttons > a.card-footer-item,
    footer.card-footer.is-large-buttons > .card-footer-item {
        width: 100%;
    }
}

/* Schedule actions for single view */
.schedule-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.schedule-actions .button,
.schedule-actions button {
    width: auto;
    display: inline-block;
}

.schedule-actions .button.is-danger,
.schedule-actions button[type="submit"],
.schedule-actions form {
    width: auto;
    display: inline-block;
}

/* Notification actions */
.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.notification-actions a,
.notification-actions button,
.notification-actions form {
    width: auto;
    display: inline-block;
}

/* Single view action buttons (Fire, Delete, etc.) */
.card-footer-item form button,
.card-footer-item .button {
    width: auto;
    display: inline-block;
}


/* ============================================================
   Class Catalog
   ============================================================ */

.catalog-header { padding: 0.75rem 0 0.5rem; display: flex; align-items: baseline; justify-content: space-between; }
.catalog-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0; }
.catalog-code-link { font-size: 0.85rem; color: #1d4ed8; text-decoration: none; white-space: nowrap; }
.catalog-code-link:hover { text-decoration: underline; }

.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 1rem 1rem 0.5rem; }
.filter-btn {
    padding: 0.3rem 0.9rem;
    border: 2px solid #000;
    border-radius: 2rem;
    background: #d5e1ed;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.filter-btn:hover { background: #c0ccd8; }
.filter-btn.active { background: #000; color: #fff; }

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1.25rem;
    padding: 1rem 1rem 2rem;
}

.class-card {
    border: 2px solid #000;
    border-radius: 0.75rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.class-card-body { padding: 1.25rem 1.25rem 0.75rem; flex: 1; }
.class-card-footer {
    border-top: 1px solid #e2e8f0;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}
.class-card-footer a { text-decoration: none; font-weight: 500; }
.class-card-footer span { color: #9ca3af; }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.card-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.card-desc { font-size: 0.88rem; color: #475569; line-height: 1.5; margin: 0.4rem 0 0.75rem; }

.state-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.state-badge.active    { background: #dbeafe; color: #1d4ed8; }
.state-badge.completed { background: #dcfce7; color: #16a34a; }
.state-badge.available { background: #f1f5f9; color: #475569; }
.state-badge.locked    { background: #f3f4f6; color: #9ca3af; }

.class-card.state-active    { border-left: 6px solid #1d4ed8; }
.class-card.state-completed { border-left: 6px solid #16a34a; background: #f0fdf4; }
.class-card.state-locked    { border-color: #d1d5db; background: #f9fafb; opacity: 0.72; }
.class-card.state-locked .class-card-footer { pointer-events: none; }

.card-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.meta-tag {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.3rem;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.meta-tag.code-required { background: #fef9c3; color: #92400e; border-color: #fde68a; }
.meta-tag.free { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }

.catalog-empty { padding: 1rem; color: #9ca3af; font-size: 0.9rem; display: none; }
.catalog-actions { padding: 0 1rem 2rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ============================================================
   Page Layout — shared across detail/progress views
   ============================================================ */

.page-content {
    max-width: 52rem;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.page-content h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-content h2 { font-size: 1.2rem; font-weight: 600; margin: 1.75rem 0 0.75rem; }
.page-desc { color: #475569; margin-bottom: 1.25rem; }

/* Breadcrumb */
.breadcrumb { font-size: 0.85rem; color: #9ca3af; margin-bottom: 1.25rem; }
.breadcrumb a { color: #475569; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { margin: 0 0.4rem; }

/* Status banners */
.status-banner {
    border-radius: 0.5rem;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
}
.status-banner.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.status-banner.info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.status-banner.warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

.role-tag {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    background: #dbeafe;
    color: #1d4ed8;
}

/* Module index (class-detail ordered list) */
.module-index { padding-left: 1.25rem; line-height: 2; }
.module-index a { text-decoration: none; color: #1d4ed8; }
.module-index a:hover { text-decoration: underline; }

/* Module progress list (class-progress) */
.module-list {
    border: 2px solid #000;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.module-row {
    display: grid;
    grid-template-columns: 2.5rem 1fr 10rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    gap: 0.75rem;
}
.module-row:last-child { border-bottom: none; }
.module-row.is-locked { opacity: 0.5; }

.module-status-icon { text-align: center; font-size: 1.1rem; }
.micon-done   { color: #16a34a; }
.micon-active { color: #d97706; }
.micon-open   { color: #9ca3af; }
.micon-locked { color: #d1d5db; }

.module-title { font-weight: 600; font-size: 0.95rem; }
.module-title a { text-decoration: none; color: inherit; }
.module-title a:hover { text-decoration: underline; }
.module-count { display: block; font-size: 0.75rem; color: #9ca3af; margin-top: 0.1rem; }

.mprogress { width: 100%; height: 0.4rem; border-radius: 1rem; }
.mprogress.done   { accent-color: #16a34a; }
.mprogress.active { accent-color: #d97706; }

/* Action row — buttons at bottom of pages */
.action-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
    align-items: center;
}

.btn-danger-outline {
    background: transparent;
    border: 2px solid #dc2626;
    color: #dc2626;
    font-size: 0.82rem;
    padding: 0.3rem 0.8rem;
    border-radius: 0.4rem;
    cursor: pointer;
}
.btn-danger-outline:hover { background: #fef2f2; }

.enrollment-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.inline-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.inline-progress progress {
    width: 8rem;
    height: 0.5rem;
    border-radius: 1rem;
    accent-color: #16a34a;
}

.inline-progress-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #15803d;
    white-space: nowrap;
}

.module-index-locked { color: #9ca3af; }
.module-index-locked span { cursor: default; }

.module-index-done { color: #15803d; }
.module-check { color: #16a34a; font-weight: 700; margin-right: 0.35rem; }

/* ============================================================
   Module View
   ============================================================ */

.module-content {
    border: 2px solid #000;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

.module-section {
    border: 2px solid #000;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.module-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.checklist { display: flex; flex-direction: column; gap: 0.5rem; }

.checklist-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}
.checklist-row:last-child { border-bottom: none; }
.checklist-row input[type="checkbox"] { flex-shrink: 0; width: 1.1rem; height: 1.1rem; cursor: pointer; }
.checklist-label { flex: 1; font-size: 0.95rem; }

.checklist-action-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 0.3rem;
    background: #dbeafe;
    color: #1d4ed8;
    text-decoration: none;
    white-space: nowrap;
}
.checklist-action-tag:hover { background: #bfdbfe; }

.checklist-type-tag {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.3rem;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
}

.status-error { color: #dc2626; font-size: 0.9rem; }


/* ============================================================
   Admin — Class Management
   ============================================================ */

.admin-page-header { display: flex; align-items: baseline; justify-content: space-between; padding: 0.75rem 0 1rem; }
.admin-page-header h1 { font-size: 1.6rem; font-weight: 700; margin: 0; }
.admin-class-id { font-size: 0.78rem; color: #888; margin-left: 0.5rem; font-family: monospace; }

.admin-class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1.25rem; padding-bottom: 2rem; }

.admin-class-card { background: #fff; border: 1px solid #d1d5db; border-radius: 0.5rem; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.admin-class-card.is-hidden-class { opacity: 0.55; border-style: dashed; }

.admin-class-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.admin-class-title { font-weight: 700; font-size: 1rem; display: block; }
.admin-class-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.admin-tag { font-size: 0.72rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.tag-hidden   { background: #fef3c7; color: #92400e; }
.tag-code     { background: #dbeafe; color: #1e40af; }
.tag-open     { background: #dcfce7; color: #166534; }
.tag-active   { background: #dcfce7; color: #166534; }
.tag-completed { background: #dbeafe; color: #1e40af; }
.tag-withdrawn { background: #fef3c7; color: #92400e; }

.admin-class-desc { font-size: 0.85rem; color: #555; line-height: 1.5; }
.admin-class-meta { display: flex; gap: 1rem; font-size: 0.82rem; color: #666; flex-wrap: wrap; }
.admin-class-detail-line { font-size: 0.82rem; color: #555; }
.admin-detail-label { font-weight: 600; color: #333; margin-right: 0.25rem; }

.admin-module-list { font-size: 0.82rem; color: #555; }
.admin-module-list summary { cursor: pointer; color: #1d4ed8; }
.admin-module-list ol { margin: 0.4rem 0 0 1.2rem; }

.admin-class-actions { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; border-top: 1px solid #e5e7eb; align-items: center; }
.admin-class-actions form { margin: 0; }

.btn-danger-outline { background: #fff; color: #dc2626; border: 2px solid #dc2626 !important; }
.btn-danger-outline:hover { background: #fee2e2; }
.admin-btn-sm { padding: 0.25rem 0.65rem !important; font-size: 0.8rem !important; }

/* Admin stat row */
.admin-stat-row { display: flex; gap: 0; border: 1px solid #d1d5db; border-radius: 0.5rem; overflow: hidden; margin-bottom: 1.25rem; }
.admin-stat { flex: 1; text-align: center; padding: 0.65rem 0.5rem; border-right: 1px solid #d1d5db; font-size: 0.75rem; color: #666; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-stat:last-child { border-right: none; }
.admin-stat span { display: block; font-size: 1.3rem; font-weight: 700; color: #111; line-height: 1.2; margin-bottom: 0.2rem; text-transform: none; letter-spacing: 0; }

/* Admin two-column layout */
.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (max-width: 640px) { .admin-two-col { grid-template-columns: 1fr; } }

/* Admin role rows */
.admin-role-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; }
.admin-email { display: block; font-size: 0.78rem; color: #888; }

/* Admin add row (inline form) */
.admin-add-row { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.admin-add-row input[type="email"] { flex: 1; padding: 0.35rem 0.6rem; font-size: 0.88rem; border: 1px solid #ccc; border-radius: 0.35rem; }
.admin-add-row button { white-space: nowrap; }

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; color: #888; padding: 0.4rem 0.6rem; border-bottom: 2px solid #e5e7eb; }
.admin-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
