/* Prism - My Courses redesign trial (folders/folders.php only).
   Loaded through $pageStylesheets; everything is scoped to .v2-page /
   .v2-navbar / .v2-footer so no other page is affected. */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800&display=swap');

.v2-page {
    --v2-bg: #F5F6F4;
    --v2-surface: #FFFFFF;
    --v2-border: #DCE3DE;
    --v2-divider: #E4EAE6;
    --v2-text: #12261C;
    --v2-muted: #4B5A52;
    --v2-green: #1B7A3E;
    --v2-green-dark: #14532D;
    --v2-green-soft: #E3F2E5;
    --v2-nav: #003326;           /* matches the logo image's own background */
    --v2-gold: #F0C75E;
    background-color: var(--v2-bg);
    color: var(--v2-text);
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.v2-page :focus-visible {
    outline: 3px solid #1B6FD8;
    outline-offset: 2px;
}

/* ---------- Navbar ---------- */

.v2-navbar {
    background-color: var(--v2-nav);
}

.v2-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.v2-brand-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, .45);
}

.v2-brand-name {
    color: var(--v2-gold);
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: .02em;
}

.v2-navbar .v2-nav-link {
    display: inline-flex;
    align-items: center;
    padding: .5rem .25rem;
    margin-right: .75rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.v2-navbar .v2-nav-link:hover,
.v2-navbar .v2-nav-link.active {
    color: #fff;
    border-bottom-color: var(--v2-gold);
}

.v2-icon-btn {
    color: #fff;
    border: 0;
    font-size: 1.35rem;
    padding: .35rem .6rem;
}

.v2-icon-btn:hover,
.v2-icon-btn:focus-visible,
.v2-icon-btn.show {
    color: var(--v2-gold);
}

.v2-user-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: #fff;
    border: 0;
    font-weight: 600;
    font-size: 1.05rem;
}

.v2-user-btn:hover,
.v2-user-btn.show {
    color: #fff;
}

.v2-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F6EBC8;
    color: var(--v2-green-dark);
    font-weight: 800;
}

/* ---------- Header ---------- */

.v2-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin: .5rem 0 1.5rem;
}

.v2-h1 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.01em;
    margin-bottom: .35rem;
    color: var(--v2-text);
}

.v2-subtitle {
    color: var(--v2-muted);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.v2-create {
    text-align: right;
}

.v2-create p {
    margin: .5rem 0 0;
    color: var(--v2-muted);
    font-size: .95rem;
}

.v2-btn-primary {
    background: var(--v2-green);
    border: 0;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    padding: .7rem 1.5rem;
    border-radius: .5rem;
}

.v2-btn-primary:hover,
.v2-btn-primary:focus-visible {
    background: var(--v2-green-dark);
    color: #fff;
}

.v2-h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

/* ---------- Toolbar ---------- */

.v2-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) auto;
    align-items: end;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.v2-toolbar .form-control,
.v2-toolbar .form-select {
    height: 50px;
    border-color: #C7D0CA;
    border-radius: .5rem;
    font-size: 1.05rem;
}

.v2-search {
    position: relative;
}

.v2-search > .bi {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--v2-muted);
}

.v2-search .form-control {
    padding-left: 2.9rem;
}

.v2-status .form-label {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: .35rem;
}

.v2-view-toggle {
    display: inline-flex;
    height: 50px;
    border: 1px solid #C7D0CA;
    border-radius: .5rem;
    background: var(--v2-surface);
    overflow: hidden;
}

.v2-view-toggle a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: 0 1.1rem;
    color: var(--v2-text);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.v2-view-toggle a.active {
    background: var(--v2-green-soft);
    color: var(--v2-green-dark);
}

.v2-view-toggle a:hover:not(.active) {
    background: #F1F4F2;
}

@media (max-width: 991.98px) {
    .v2-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .v2-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .v2-toolbar {
        grid-template-columns: 1fr;
    }

    .v2-create {
        text-align: left;
    }
}

/* ---------- Course card ---------- */

.v2-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.v2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.v2-course {
    position: relative;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: .85rem;
    box-shadow: 0 1px 3px rgba(18, 38, 28, .05);
    transition: box-shadow .15s ease, border-color .15s ease;
}

.v2-course:hover,
.v2-course:focus-within {
    border-color: #A9C7B1;
    box-shadow: 0 .5rem 1.25rem rgba(18, 38, 28, .08);
}

.v2-course-icon {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: .75rem;
    background: var(--v2-green-soft);
    color: var(--v2-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
}

.v2-course-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: .5rem;
    color: var(--v2-text);
}

.v2-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .6rem;
}

.v2-pill {
    display: inline-block;
    padding: .2rem .9rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    border: 1.5px solid transparent;
}

.v2-pill-role {
    background: var(--v2-green-soft);
    color: var(--v2-green-dark);
}

.v2-pill-status {
    border-color: var(--v2-green);
    color: var(--v2-green-dark);
}

.v2-pill-archived {
    border-color: #8A948F;
    color: #4B5450;
}

.v2-meta {
    margin-bottom: .75rem;
}

.v2-meta > div {
    margin-bottom: .1rem;
}

.v2-meta dt,
.v2-meta dd {
    display: inline;
    margin: 0;
    font-weight: 400;
}

.v2-meta dt {
    color: var(--v2-muted);
}

.v2-meta dd {
    color: var(--v2-text);
}

.v2-stats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    row-gap: .4rem;
}

.v2-stats li {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding-right: 1.5rem;
    margin-right: 1.5rem;
    border-right: 1px solid #C7D0CA;
    font-size: 1.05rem;
}

.v2-stats li:last-child {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
}

.v2-stats .bi {
    font-size: 1.3rem;
    color: #2F3B35;
}

.v2-btn-open {
    border: 2px solid var(--v2-green);
    color: var(--v2-green-dark);
    background: var(--v2-surface);
    font-weight: 700;
    font-size: 1.15rem;
    padding: .55rem 1.25rem;
    border-radius: .5rem;
    white-space: nowrap;
}

.v2-btn-open:hover,
.v2-btn-open:focus-visible {
    background: var(--v2-green);
    border-color: var(--v2-green);
    color: #fff;
}

.v2-next-step {
    margin: .6rem 0 0;
    color: var(--v2-muted);
    text-align: center;
    font-size: .98rem;
}

/* List layout: icon | details | action, with dividers */
.v2-course-list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.4rem 1.75rem;
}

.v2-course-list .v2-course-main {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 1.5rem;
    border-left: 1px solid var(--v2-divider);
}

.v2-course-list .v2-course-action {
    flex: 0 0 auto;
    width: 260px;
    padding-left: 1.5rem;
    border-left: 1px solid var(--v2-divider);
    text-align: center;
}

@media (max-width: 991.98px) {
    .v2-course-list {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .v2-course-list .v2-course-main {
        flex-basis: calc(100% - 72px - 1.5rem);
    }

    .v2-course-list .v2-course-action {
        width: 100%;
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--v2-divider);
        padding-top: 1rem;
    }
}

@media (max-width: 575.98px) {
    .v2-course-list .v2-course-main {
        flex-basis: 100%;
        padding-left: 0;
        border-left: 0;
    }

    .v2-stats li {
        border-right: 0;
        margin-right: 0;
        padding-right: 0;
        width: 100%;
    }
}

/* Card layout: stacked, action at the bottom */
.v2-course-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.v2-course-card .v2-course-icon {
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
}

.v2-course-card .v2-course-title {
    font-size: 1.3rem;
}

.v2-course-card .v2-stats {
    flex-direction: column;
}

.v2-course-card .v2-stats li {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
}

.v2-course-card .v2-course-action {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--v2-divider);
}

.v2-course-card .v2-btn-open {
    width: 100%;
}

/* ---------- Below the list ---------- */

.v2-list-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.25rem;
    margin-top: 1rem;
    color: var(--v2-muted);
}

.v2-list-footer-sep {
    width: 1px;
    height: 1.25rem;
    background: #C7D0CA;
}

.v2-empty {
    background: var(--v2-surface);
    border: 1px dashed #C7D0CA;
    border-radius: .85rem;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--v2-muted);
}

.v2-empty .bi {
    display: block;
    font-size: 2.5rem;
    margin-bottom: .75rem;
}

.v2-page .pagination .page-link {
    color: var(--v2-green-dark);
}

.v2-page .pagination .page-item.active .page-link {
    background-color: var(--v2-green);
    border-color: var(--v2-green);
    color: #fff;
}

/* ---------- Footer ---------- */

.v2-footer {
    background: var(--v2-surface, #fff);
    border-top: 1px solid #DCE3DE;
    color: #2F3B35;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.v2-footer a {
    color: #1B7A3E;
    font-weight: 600;
    text-decoration: none;
}

.v2-footer a:hover {
    text-decoration: underline;
}

/* ---------- Forms (Create a course, ...) ---------- */

.v2-back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--v2-green-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.v2-back-link:hover {
    color: var(--v2-green);
}

.v2-muted {
    color: var(--v2-muted);
}

.v2-panel {
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: .85rem;
    padding: 1.75rem;
}

.v2-panel-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: .25rem;
}

.v2-label {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: .45rem;
}

.v2-tag {
    font-size: .85rem;
    font-weight: 600;
    padding: .15rem .7rem;
    border-radius: 999px;
}

.v2-tag-required {
    background: var(--v2-green-soft);
    color: var(--v2-green-dark);
}

.v2-tag-optional {
    background: #EDEFEE;
    color: #4B5450;
}

.v2-input {
    border-color: #C7D0CA;
    border-radius: .5rem;
    font-size: 1.05rem;
    padding: .7rem 1rem;
}

.v2-input:focus {
    border-color: var(--v2-green);
    box-shadow: 0 0 0 .2rem rgba(27, 122, 62, .2);
}

.v2-help {
    color: var(--v2-muted);
    margin: .45rem 0 0;
}

.v2-divider {
    border-color: var(--v2-divider);
    opacity: 1;
    margin: 1.5rem 0;
}

.v2-btn-dark {
    background: #0E4D2B;
    border: 0;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: .65rem 1.4rem;
    border-radius: .5rem;
}

.v2-btn-dark:hover,
.v2-btn-dark:focus-visible {
    background: var(--v2-green);
    color: #fff;
}

.v2-btn-secondary {
    background: var(--v2-surface);
    border: 1px solid #9AA5A0;
    color: #3A4540;
    font-size: 1.1rem;
    padding: .65rem 1.4rem;
    border-radius: .5rem;
}

.v2-btn-secondary:hover {
    background: #F1F4F2;
    color: #1F2925;
}

.v2-note {
    margin: .75rem 0 0;
    font-style: italic;
    color: var(--v2-muted);
}

.v2-aside {
    background: #EEF8EC;
    border: 1px solid #CFE6CF;
    border-radius: .85rem;
    padding: 1.75rem;
    color: #2F3B35;
}

.v2-aside-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0E3B22;
    margin-bottom: 1.25rem;
}

.v2-aside-subtitle {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0E3B22;
    margin-bottom: .5rem;
}

.v2-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.v2-steps li {
    display: grid;
    grid-template-columns: 64px 32px 1fr;
    gap: .75rem;
    align-items: start;
}

.v2-steps strong {
    display: block;
    font-size: 1.1rem;
    color: #0E3B22;
}

.v2-step-icon {
    width: 64px;
    height: 64px;
    border-radius: .75rem;
    background: #DCEFD9;
    color: var(--v2-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.v2-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #DCEFD9;
    color: #0E3B22;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 575.98px) {
    .v2-panel,
    .v2-aside {
        padding: 1.25rem;
    }

    .v2-steps li {
        grid-template-columns: 48px 28px 1fr;
    }

    .v2-step-icon {
        width: 48px;
        height: 48px;
        font-size: 1.35rem;
    }
}

/* ---------- Course page ---------- */

.v2-course-header {
    margin: .75rem 0 1.5rem;
}

/* Title spans the whole card; details (left) and counts (right) share the row below it. */
.v2-course-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.v2-course-header-main {
    flex: 1 1 380px;
    min-width: 0;
}

.v2-course-header-title {
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: 800;
    margin-bottom: .6rem;
}

.v2-course-header-stats {
    display: flex;
    margin: 0;
}

.v2-course-header-stats > div {
    padding: .25rem 2rem;
    border-left: 1px solid #C7D0CA;
}

.v2-course-header-stats dd {
    margin: 0;
    color: #2F3B35;
    font-size: 1.05rem;
}

.v2-big-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0E3B22;
}

@media (max-width: 767.98px) {
    .v2-course-header-stats > div:first-child {
        border-left: 0;
        padding-left: 0;
    }

    .v2-course-header-stats > div {
        padding: .25rem 1rem;
    }
}

.v2-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .4rem;
    margin-bottom: 1.75rem;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: .85rem;
}

.v2-tab {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1.4rem;
    border: 1px solid #C7D0CA;
    border-radius: .55rem;
    color: #0E3B22;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    background: var(--v2-surface);
}

.v2-tab .bi {
    font-size: 1.3rem;
}

.v2-tab:hover {
    border-color: var(--v2-green);
    color: #0E3B22;
}

.v2-tab.active {
    background: #0E4D2B;
    border-color: #0E4D2B;
    color: #fff;
}

.v2-section-title {
    font-size: 1.9rem;
    font-weight: 800;
}

.v2-assignment {
    align-items: stretch;
}

.v2-course-list.v2-assignment .v2-assignment-main {
    padding-left: 0;
    border-left: 0;
}

.v2-assignment-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
}

.v2-assignment-meta {
    color: #2F3B35;
}

.v2-status-tag {
    font-size: .9rem;
    font-weight: 700;
    padding: .15rem .75rem;
    border-radius: 999px;
}

.v2-status-draft {
    background: #FCE8B2;
    color: #6B4A00;
}

.v2-status-published {
    background: var(--v2-green-soft);
    color: var(--v2-green-dark);
}

.v2-status-archived {
    background: #EDEFEE;
    color: #4B5450;
}

.v2-draft-note {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: .6rem 0 .25rem;
    padding: .5rem .9rem;
    border-radius: .5rem;
    background: #FFF4D6;
    color: #4A3700;
}

.v2-draft-note .bi {
    font-size: 1.15rem;
    color: #8A5A00;
}

.v2-assignment-stats {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    row-gap: .35rem;
    padding: 0;
    margin: .75rem 0 0;
}

.v2-assignment-stats li {
    padding: 0 1.75rem;
    border-left: 1px solid #C7D0CA;
    color: #2F3B35;
}

.v2-assignment-stats li:first-child {
    padding-left: .5rem;
    border-left: 0;
}

.v2-assignment-stats strong {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0E3B22;
    margin-right: .4rem;
}

.v2-tip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1rem;
    margin-top: 1.75rem;
    padding: .9rem 1.4rem;
    border: 1px solid #CFE6CF;
    border-radius: .75rem;
    background: #EEF8EC;
    color: #2F3B35;
}

.v2-tip > .bi {
    font-size: 1.5rem;
    color: var(--v2-green);
}

.v2-tip strong {
    font-size: 1.15rem;
    color: #0E3B22;
}

.v2-tip-sep {
    width: 1px;
    height: 1.5rem;
    background: #B9D4BC;
}

.v2-tip a {
    color: var(--v2-green-dark);
    font-weight: 700;
    text-underline-offset: 3px;
}

/* ---------- Member tables (Course Students) ---------- */

.v2-btn-outline {
    background: var(--v2-surface);
    border: 2px solid var(--v2-green);
    color: var(--v2-green-dark);
    font-weight: 700;
    font-size: 1.1rem;
    padding: .55rem 1.3rem;
    border-radius: .5rem;
}

.v2-btn-outline:hover,
.v2-btn-outline:focus-visible {
    background: var(--v2-green);
    color: #fff;
}

.v2-table-panel {
    padding: 1.25rem;
}

.v2-table-panel .v2-search {
    max-width: 640px;
}

.v2-table {
    --bs-table-bg: transparent;
}

.v2-table thead th {
    background: #ECEFED;
    color: #12261C;
    font-weight: 700;
    border-bottom: 0;
    padding: .75rem 1rem;
}

.v2-table thead th:first-child {
    border-radius: .5rem 0 0 .5rem;
}

.v2-table thead th:last-child {
    border-radius: 0 .5rem .5rem 0;
}

.v2-table tbody td {
    padding: .85rem 1rem;
    border-color: var(--v2-divider);
}

.v2-initials {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--v2-green-soft);
    color: var(--v2-green-dark);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v2-cell-sub {
    color: var(--v2-muted);
    font-size: .95rem;
}

.v2-badge {
    display: inline-block;
    padding: .25rem .8rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
}

.v2-badge-ok {
    background: var(--v2-green-soft);
    color: var(--v2-green-dark);
}

.v2-badge-wait {
    background: #FCE8B2;
    color: #6B4A00;
}

.v2-btn-danger-outline {
    border: 1.5px solid #B42318;
    color: #B42318;
    background: var(--v2-surface);
    font-weight: 600;
    padding: .35rem .9rem;
}

.v2-btn-danger-outline:hover,
.v2-btn-danger-outline:focus-visible {
    background: #B42318;
    border-color: #B42318;
    color: #fff;
}

.v2-table-count {
    margin: .9rem 0 0;
    color: var(--v2-muted);
}

/* Tables list every row on the page - no inner scroll boxes. Text wraps to
   fit the width; on phones each row becomes a labelled block. */
.v2-table {
    width: 100%;
}

.v2-table td,
.v2-table .v2-cell-sub {
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .v2-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

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

    .v2-table tr {
        padding: .75rem 0;
        border-bottom: 1px solid var(--v2-divider);
    }

    .v2-table tbody td {
        display: flex;
        gap: 1rem;
        padding: .3rem 0;
        border: 0;
        text-align: left !important;
    }

    .v2-table tbody td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 9.5rem;
        font-weight: 700;
        color: var(--v2-muted);
    }

    .v2-table tbody td[data-label="Student"]::before {
        display: none;
    }
}

.v2-btn-edit {
    border: 1.5px solid var(--v2-green);
    color: var(--v2-green-dark);
    background: var(--v2-surface);
    font-weight: 600;
    padding: .35rem .9rem;
}

.v2-btn-edit:hover,
.v2-btn-edit:focus-visible {
    background: var(--v2-green);
    border-color: var(--v2-green);
    color: #fff;
}

.v2-table tbody td[data-label="Reviewer"]::before {
    display: none;
}

/* ---------- Course actions (course header) ---------- */

/* Title and the Course actions button share the top row; the title wraps,
   the button stays at the top right. */
.v2-course-header-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.v2-course-header-top .v2-course-header-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.v2-course-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: .75rem;
    flex: 0 0 auto;
    margin-top: .35rem;
}

.v2-btn-sm {
    font-size: 1rem;
    padding: .45rem 1rem;
}

.v2-btn-actions {
    background: #EEF8EC;
    border: 1.5px solid var(--v2-green);
    color: var(--v2-green-dark);
    font-weight: 700;
    font-size: 1rem;
    padding: .45rem 1rem;
    border-radius: .5rem;
}

.v2-btn-actions:hover,
.v2-btn-actions:focus-visible,
.v2-btn-actions.show {
    background: var(--v2-green-soft);
    border-color: var(--v2-green-dark);
    color: var(--v2-green-dark);
}

.v2-actions-menu {
    min-width: 330px;
    padding: .5rem;
    border-radius: .75rem;
    border-color: var(--v2-border);
    box-shadow: 0 .75rem 1.75rem rgba(18, 38, 28, .14);
}

.v2-actions-menu .dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .6rem .75rem;
    border-radius: .5rem;
    font-weight: 600;
    color: var(--v2-text);
    white-space: normal;
}

.v2-actions-menu .dropdown-item .bi {
    font-size: 1.2rem;
    line-height: 1.3;
}

.v2-actions-menu .dropdown-item small {
    display: block;
    font-weight: 400;
    font-size: .85rem;
    margin-top: .1rem;
}

.v2-actions-menu .dropdown-item:hover,
.v2-actions-menu .dropdown-item:focus-visible {
    background: #F1F4F2;
}

.v2-actions-menu .v2-item-warn {
    color: #8A4A00;
}

.v2-actions-menu .v2-item-danger {
    color: #B42318;
}

.v2-actions-menu .v2-item-disabled {
    color: #6F7A75;
    opacity: 1;
}

.v2-btn-warn {
    background: #B45309;
    border: 0;
    color: #fff;
    font-weight: 700;
    padding: .65rem 1.4rem;
    border-radius: .5rem;
}

.v2-btn-warn:hover,
.v2-btn-warn:focus-visible {
    background: #8A3F07;
    color: #fff;
}

/* Copy course options */
.v2-copy-options .form-check {
    padding: .55rem .75rem .55rem 2.25rem;
    border: 1px solid var(--v2-divider);
    border-radius: .5rem;
    margin-bottom: .4rem;
}

/* Wider Copy course window: options in two columns so it fits on screen and centers. */
@media (min-width: 768px) {
    .v2-copy-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
        margin-bottom: .75rem;
    }

    .v2-copy-grid .form-check {
        margin-bottom: 0;
    }
}

.v2-copy-options .form-check-label small {
    display: block;
    color: var(--v2-muted);
}

.v2-copy-count {
    font-size: .85rem;
    font-weight: 600;
    color: var(--v2-green-dark);
    background: var(--v2-green-soft);
    border-radius: 999px;
    padding: .05rem .55rem;
    margin-left: .25rem;
}

/* Rubric used by an assignment (course page cards) */
.v2-meta-sep {
    margin: 0 .4rem;
    color: #9AA5A0;
}

.v2-rubric-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--v2-green-dark);
    font-weight: 600;
}

.v2-rubric-none {
    color: var(--v2-muted);
    font-weight: 500;
}

/* ---------- Assignment pages ---------- */

.v2-breadcrumb {
    --bs-breadcrumb-divider-color: var(--v2-muted);
}

.v2-breadcrumb a {
    color: var(--v2-green-dark);
    text-underline-offset: 3px;
}

.v2-assignment-header {
    margin: .75rem 0 1.25rem;
}

.v2-assignment-course {
    color: #2F3B35;
}

.v2-assignment-header-title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    margin-bottom: .6rem;
    overflow-wrap: anywhere;
}

.v2-pill-draft {
    background: #FCE8B2;
    color: #6B4A00;
}

.v2-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #C7D0CA;
}

.v2-subtab {
    padding: .6rem 1.4rem;
    border: 1px solid #C7D0CA;
    border-bottom: 0;
    border-radius: .5rem .5rem 0 0;
    background: var(--v2-surface);
    color: var(--v2-text);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: -1px;
}

.v2-subtab:hover {
    color: var(--v2-green-dark);
    background: #F1F4F2;
}

.v2-subtab.active {
    background: #0E4D2B;
    border-color: #0E4D2B;
    color: #fff;
}

.v2-doc p {
    margin-bottom: 1rem;
}

.v2-doc-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: .6rem;
}

.v2-doc-subtitle {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 1.1rem 0 .4rem;
}

.v2-plain-list {
    padding-left: 1.25rem;
    margin-bottom: .75rem;
}

.v2-resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.v2-resource-list li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .3rem 0;
}

.v2-resource-list .bi {
    color: var(--v2-green);
    font-size: 1.2rem;
}

.v2-resource-list a {
    color: var(--v2-green-dark);
    font-weight: 600;
    text-underline-offset: 3px;
}

.v2-arrow-link {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.v2-footnote {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .9rem;
    color: #2F3B35;
}

.v2-badge-muted {
    background: #EDEFEE;
    color: #3A4540;
}

/* ---- Assignment Rubric tab (activities/rubric.php) ---- */
.v2-rubric-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.v2-rubric-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: .2rem !important;
}

.v2-rubric-stats {
    color: var(--v2-muted);
    font-weight: 600;
    margin-bottom: .5rem !important;
}

.v2-rubric-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.v2-rubric-lock {
    margin: 1rem 0 0;
}

.v2-rubric-pick {
    max-width: 36rem;
}

.v2-rubric-table {
    width: 100%;
    margin-top: 1.25rem;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--v2-border);
    border-radius: .6rem;
    overflow: hidden;
}

.v2-rubric-table thead th {
    background: var(--v2-green-dark);
    color: #fff;
    font-weight: 700;
    padding: .8rem 1rem;
    vertical-align: bottom;
}

.v2-rubric-pts {
    font-weight: 400;
    white-space: nowrap;
}

.v2-rubric-table tbody th,
.v2-rubric-table tbody td {
    padding: .9rem 1rem;
    vertical-align: top;
    border-top: 1px solid var(--v2-divider);
}

.v2-rubric-table tbody td {
    border-left: 1px solid var(--v2-divider);
}

.v2-rubric-table tbody th {
    width: 22%;
    font-weight: 700;
    background: #F7FAF8;
}

@media (max-width: 767.98px) {
    .v2-rubric-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .v2-rubric-table,
    .v2-rubric-table tbody,
    .v2-rubric-table tr,
    .v2-rubric-table th,
    .v2-rubric-table td {
        display: block;
        width: 100% !important;
    }

    .v2-rubric-table {
        border: 0;
        overflow: visible;
    }

    .v2-rubric-table tbody tr {
        border: 1px solid var(--v2-border);
        border-radius: .6rem;
        overflow: hidden;
        margin-bottom: .9rem;
    }

    .v2-rubric-table tbody th {
        border-top: 0;
        background: var(--v2-green-dark);
        color: #fff;
    }

    .v2-rubric-table tbody td {
        border-left: 0;
    }

    .v2-rubric-table tbody td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        color: var(--v2-green-dark);
        margin-bottom: .2rem;
    }
}

.v2-rubric-actions .btn {
    font-size: 1rem;
    padding: .5rem 1.1rem;
    border-width: 2px;
}

/* Icon + one sentence, kept side by side and vertically centred (student "Your submission" panel). */
.v2-tip-inline {
    flex-wrap: nowrap;
    padding: .8rem 1rem;
}

.v2-tip-inline > .bi {
    flex-shrink: 0;
    line-height: 1;
}

.v2-tip-inline > span {
    flex: 1;
}

/* ---- Student Submissions tab (activities/submissions.php) ---- */
.v2-sub-intro {
    margin-bottom: 1rem;
}

/* Summary tiles: students / submitted / not submitted / finalized evaluations */
.v2-sub-stats {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.v2-sub-stats li {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.25rem;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: .85rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.v2-sub-stat-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--v2-green-dark);
}

.v2-sub-stat-ok {
    background: var(--v2-green-soft);
}

.v2-sub-stat-wait {
    background: #FCE8B2;
    color: #6B4A00;
}

/* Search + status filter above the table */
.v2-sub-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px) auto;
    gap: 1rem;
    margin-bottom: 1rem;
}

.v2-sub-toolbar .form-control,
.v2-sub-toolbar .form-select {
    height: 48px;
    border-color: #C7D0CA;
    border-radius: .5rem;
}

@media (max-width: 575.98px) {
    .v2-sub-toolbar {
        grid-template-columns: 1fr;
    }
}

/* Revision requested notice holds a button; let it wrap on phones. */
.v2-draft-note .btn {
    white-space: nowrap;
}

.v2-draft-note:has(.btn) {
    flex-wrap: wrap;
    padding: .7rem .9rem;
}

/* Evaluation progress (course owner): extra status badges and check columns */
.v2-badge-info {
    background: #DCEBFA;
    color: #0B4A8B;
}

.v2-badge-ready {
    background: var(--v2-surface);
    border: 1.5px solid var(--v2-green);
    color: var(--v2-green-dark);
}

.v2-progress-cell {
    white-space: nowrap;
}

.v2-progress-done {
    color: var(--v2-green);
    font-size: 1.15rem;
    vertical-align: -2px;
}

.v2-progress-failed {
    color: #B42318;
    font-weight: 600;
    cursor: help;
}

/* Student Submissions table: one-line emails and action buttons. An
   unusually long email ends in "..." (full address on hover). */
.v2-sub-table td .btn {
    white-space: nowrap;
}

.v2-sub-student {
    min-width: 0;
}

.v2-sub-table .v2-sub-email {
    max-width: 15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
}

/* Owner's table: tighter cells so the progress columns fit. */
.v2-sub-table-wide thead th,
.v2-sub-table-wide tbody td {
    padding-left: .6rem;
    padding-right: .6rem;
}

/* Two-line headers ("Student / Self-Review"): break only at the <br>. */
.v2-sub-table-wide thead th {
    white-space: nowrap;
}

/* The course owner's table has extra progress columns: switch to the
   stacked (card) layout below 1200px instead of squeezing them. Mirrors
   the .v2-table rules at 992px. */
/* Also used by the Institutions table (.v2-org-table). */
@media (max-width: 1199.98px) {
    :is(.v2-sub-table-wide, .v2-org-table) thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    :is(.v2-sub-table-wide, .v2-org-table),
    :is(.v2-sub-table-wide, .v2-org-table) tbody,
    :is(.v2-sub-table-wide, .v2-org-table) tr,
    :is(.v2-sub-table-wide, .v2-org-table) td {
        display: block;
        width: 100%;
    }

    :is(.v2-sub-table-wide, .v2-org-table) tr {
        padding: .75rem 0;
        border-bottom: 1px solid var(--v2-divider);
    }

    :is(.v2-sub-table-wide, .v2-org-table) tbody td {
        display: flex;
        gap: 1rem;
        padding: .3rem 0;
        border: 0;
        text-align: left !important;
    }

    :is(.v2-sub-table-wide, .v2-org-table) tbody td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 9.5rem;
        font-weight: 700;
        color: var(--v2-muted);
    }

    :is(.v2-sub-table-wide, .v2-org-table) tbody td[data-label="Student"]::before {
        display: none;
    }
}


/* ---- Login (login.php) ---- */
.v2-login-card {
    padding: 2.25rem;
    box-shadow: 0 .25rem 1rem rgba(18, 38, 28, .06);
}

.v2-login-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--v2-green-dark);
    font-weight: 600;
    text-underline-offset: 3px;
}

.v2-login-link:hover {
    color: var(--v2-green);
}

@media (max-width: 575.98px) {
    .v2-login-card {
        padding: 1.5rem;
    }
}

/* Navbar on phones: logo + PRISM wordmark + menu button on one line
   (the full-size logo and wordmark were wider than a ~390px screen). */
@media (max-width: 575.98px) {
    .v2-navbar .navbar-brand {
        gap: .6rem;
        margin-right: .5rem;
        min-width: 0;
    }

    .v2-navbar .navbar-brand-logo {
        height: 38px;
        width: auto;
    }

    .v2-brand-divider {
        height: 28px;
    }

    .v2-brand-name {
        font-size: 1.2rem;
    }
}

@media (max-width: 389.98px) {
    .v2-navbar .navbar-brand {
        gap: .45rem;
    }

    .v2-navbar .navbar-brand-logo {
        height: 32px;
    }

    .v2-brand-name {
        font-size: 1.05rem;
    }
}

/* Forgot password (forgot-password.php): "link sent" confirmation. */
.v2-login-sent .bi {
    display: block;
    font-size: 2.5rem;
    color: var(--v2-green);
    margin: .75rem 0 .5rem;
}

/* ---- Notifications (notifications.php) ---- */
.v2-notif-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.v2-notif-panel {
    padding: 0;
    overflow: hidden;
}

.v2-notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-notif {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--v2-divider);
    border-left: 4px solid transparent;
}

.v2-notif:last-child {
    border-bottom: 0;
}

.v2-notif-unread {
    background: #F4FAF5;
    border-left-color: var(--v2-green);
}

.v2-notif-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--v2-green-soft);
    color: var(--v2-green-dark);
    font-size: 1.15rem;
}

.v2-notif-body {
    flex: 1;
    min-width: 0;
}

.v2-notif-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.v2-notif-title a {
    color: var(--v2-text);
    text-decoration: none;
}

.v2-notif-title a:hover,
.v2-notif-title a:focus-visible {
    color: var(--v2-green-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.v2-notif:not(.v2-notif-unread) .v2-notif-title {
    font-weight: 600;
}

.v2-notif-new {
    display: inline-block;
    margin-left: .5rem;
    padding: .1rem .55rem;
    border-radius: 999px;
    background: var(--v2-green);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    vertical-align: 2px;
}

.v2-notif-message {
    color: #2F3B35;
    overflow-wrap: anywhere;
}

.v2-notif-time {
    color: var(--v2-muted);
    font-size: .9rem;
}

.v2-notif-action .btn {
    white-space: nowrap;
}

.v2-notif-empty {
    text-align: center;
    color: var(--v2-muted);
    padding: 3rem 1rem;
}

.v2-notif-empty .bi {
    display: block;
    font-size: 2.2rem;
    margin-bottom: .5rem;
}

.v2-notif-pages {
    padding: 1rem 1.5rem .5rem;
}

@media (max-width: 575.98px) {
    .v2-notif {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .v2-notif-action {
        width: 100%;
        padding-left: calc(40px + 1rem);
    }
}

/* ---- Admin: Institutions (admin/organizations.php) ---- */
.v2-admin-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.v2-filter-label {
    display: block;
    font-weight: 700;
    margin-bottom: .35rem;
}

.v2-org-filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.v2-org-filters .form-control,
.v2-org-filters .form-select {
    height: 48px;
    border-color: #C7D0CA;
    border-radius: .5rem;
}

@media (max-width: 991.98px) {
    .v2-org-filters {
        grid-template-columns: 1fr 1fr;
    }

    .v2-org-filter-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .v2-org-filters {
        grid-template-columns: 1fr;
    }
}

.v2-org-name {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--v2-green-dark);
    font-weight: 700;
    text-decoration: none;
}

.v2-org-name:hover,
.v2-org-name:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.v2-org-logo {
    height: 24px;
    width: auto;
}

.v2-org-table thead th {
    white-space: nowrap;
}

.v2-org-table thead th[data-sort]:hover {
    color: var(--v2-green-dark);
}

.v2-org-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: .4rem;
}

.v2-org-actions form {
    margin: 0;
}

.v2-org-actions .btn {
    white-space: nowrap;
}

.v2-org-actions .btn:disabled {
    opacity: .45;
}

@media (max-width: 1199.98px) {
    .v2-org-actions {
        flex-wrap: wrap;
    }
}

/* Institutions table: eight columns + three buttons - tighter cells so it fits at 1200px. */
.v2-admin .v2-org-table thead th,
.v2-admin .v2-org-table tbody td,
.v2-org-table thead th,
.v2-org-table tbody td {
    padding-left: .55rem;
    padding-right: .55rem;
}

.v2-org-actions .btn {
    font-size: .95rem;
    padding: .35rem .7rem;
}

/* =====================================================================
   Admin pages (body.v2-admin): the v2 look applied to the Bootstrap
   components those pages are built from. Scoped so nothing else changes.
   ===================================================================== */
.v2-admin h1.v2-panel-title {
    overflow-wrap: anywhere;
}

.v2-admin .text-muted {
    color: var(--v2-muted) !important;
}

.v2-admin .card {
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: .85rem;
    box-shadow: none !important;
}

.v2-admin .card-header {
    background: var(--v2-surface);
    border-bottom: 1px solid var(--v2-divider);
    font-weight: 700;
    border-radius: .85rem .85rem 0 0;
}

.v2-admin .card-body {
    padding: 1.25rem 1.4rem;
}

.v2-admin .card .h6,
.v2-admin .card h2,
.v2-admin .card h3 {
    font-weight: 800;
    color: var(--v2-text);
}

/* Buttons */
.v2-admin .btn-primary,
.v2-admin .btn-prism-primary {
    background: #0E4D2B;
    border-color: #0E4D2B;
    color: #fff;
    font-weight: 700;
}

.v2-admin .btn-primary:hover,
.v2-admin .btn-primary:focus-visible,
.v2-admin .btn-prism-primary:hover,
.v2-admin .btn-prism-primary:focus-visible {
    background: var(--v2-green);
    border-color: var(--v2-green);
    color: #fff;
}

.v2-admin .btn-outline-primary {
    border: 1.5px solid var(--v2-green);
    color: var(--v2-green-dark);
    background: var(--v2-surface);
    font-weight: 600;
}

.v2-admin .btn-outline-primary:hover,
.v2-admin .btn-outline-primary:focus-visible {
    background: var(--v2-green);
    border-color: var(--v2-green);
    color: #fff;
}

.v2-admin .btn-outline-secondary {
    border: 1.5px solid #C7D0CA;
    color: #2F3B35;
    background: var(--v2-surface);
    font-weight: 600;
}

.v2-admin .btn-outline-secondary:hover,
.v2-admin .btn-outline-secondary:focus-visible {
    background: #EEF2EF;
    border-color: #9AA8A0;
    color: var(--v2-text);
}

.v2-admin .btn-outline-danger {
    border: 1.5px solid #B42318;
    color: #B42318;
    background: var(--v2-surface);
    font-weight: 600;
}

.v2-admin .btn-outline-danger:hover,
.v2-admin .btn-outline-danger:focus-visible {
    background: #B42318;
    color: #fff;
}

/* Forms */
.v2-admin .form-label {
    font-weight: 700;
    color: var(--v2-text);
}

.v2-admin .form-control,
.v2-admin .form-select,
.v2-admin .input-group-text {
    border-color: #C7D0CA;
    border-radius: .5rem;
}

.v2-admin .input-group > :not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.v2-admin .input-group > :not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.v2-admin .form-control:focus,
.v2-admin .form-select:focus {
    border-color: var(--v2-green);
    box-shadow: 0 0 0 .2rem rgba(27, 122, 62, .2);
}

.v2-admin .form-check-input:checked {
    background-color: var(--v2-green);
    border-color: var(--v2-green);
}

.v2-admin .form-text {
    color: var(--v2-muted);
}

/* Badges: rounded pills like .v2-badge */
.v2-admin .badge {
    border-radius: 999px;
    padding: .35em .75em;
    font-weight: 700;
}

.v2-admin .badge.bg-success {
    background: var(--v2-green-soft) !important;
    color: var(--v2-green-dark);
}

.v2-admin .badge.bg-secondary {
    background: #EDEFEE !important;
    color: #3A4540;
}

.v2-admin .badge.bg-warning {
    background: #FCE8B2 !important;
    color: #6B4A00 !important;
}

.v2-admin .badge.bg-danger {
    background: #FDE2E0 !important;
    color: #8A1C12;
}

.v2-admin .badge.bg-info,
.v2-admin .badge.bg-primary {
    background: #DCEBFA !important;
    color: #0B4A8B !important;
}

/* Tabs: underline style */
.v2-admin .nav-tabs {
    border-bottom: 1px solid #C7D0CA;
    gap: .25rem;
}

.v2-admin .nav-tabs .nav-link {
    border: 0;
    border-bottom: 3px solid transparent;
    color: #2F3B35;
    font-weight: 700;
    padding: .6rem 1rem;
}

.v2-admin .nav-tabs .nav-link:hover {
    color: var(--v2-green-dark);
    border-bottom-color: #C7D0CA;
}

.v2-admin .nav-tabs .nav-link.active {
    background: transparent;
    color: var(--v2-green-dark);
    border-bottom-color: var(--v2-green);
}

/* Tables: same look as .v2-table; every row on the page, no scroll boxes */
.v2-admin .table {
    --bs-table-bg: transparent;
    width: 100%;
}

.v2-admin .table thead th {
    background: #ECEFED;
    color: #12261C;
    font-weight: 700;
    border-bottom: 0;
    padding: .7rem .75rem;
    vertical-align: bottom;
}

.v2-admin .table thead th:first-child {
    border-radius: .5rem 0 0 .5rem;
}

.v2-admin .table thead th:last-child {
    border-radius: 0 .5rem .5rem 0;
}

.v2-admin .table tbody td {
    padding: .75rem;
    border-color: var(--v2-divider);
    overflow-wrap: anywhere;
}

.v2-admin .table-responsive {
    overflow: visible;
}

.v2-admin .alert {
    border-radius: .6rem;
}

.v2-admin a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):not(.v2-nav-link) {
    color: var(--v2-green-dark);
}

.v2-admin .page-link {
    color: var(--v2-green-dark);
}

.v2-admin .page-item.active .page-link {
    background: var(--v2-green);
    border-color: var(--v2-green);
    color: #fff;
}

.v2-admin .v2-admin-head {
    margin-bottom: 1.25rem;
}

@media (max-width: 991.98px) {
    .v2-admin .table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

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

    .v2-admin .table tr {
        padding: .6rem 0;
        border-bottom: 1px solid var(--v2-divider);
    }

    .v2-admin .table tbody td {
        display: flex;
        gap: 1rem;
        padding: .25rem 0;
        border: 0;
        text-align: left !important;
    }

    .v2-admin .table tbody td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 8.5rem;
        font-weight: 700;
        color: var(--v2-muted);
    }

    .v2-admin .table tbody td[data-label=""]::before {
        display: none;
    }
}

/* Quieter secondary action (e.g. Disable next to Manage) */
.v2-btn-quiet {
    border: 1.5px solid #C7D0CA;
    color: #2F3B35;
    background: var(--v2-surface);
    font-weight: 600;
}

.v2-btn-quiet:hover,
.v2-btn-quiet:focus-visible {
    background: #EEF2EF;
    border-color: #9AA8A0;
    color: var(--v2-text);
}

/* Admin: buttons, badges and codes in tables stay on one line ("Manage", not "Manag/e"). */
.v2-admin .table td .btn,
.v2-admin .table td .badge,
.v2-admin .table td code {
    white-space: nowrap;
    overflow-wrap: normal;
}

.v2-admin .btn-outline-warning {
    border: 1.5px solid #B45309;
    color: #8A3F07;
    background: var(--v2-surface);
    font-weight: 600;
}

.v2-admin .btn-outline-warning:hover,
.v2-admin .btn-outline-warning:focus-visible {
    background: #B45309;
    border-color: #B45309;
    color: #fff;
}

/* Error logs: one line per entry, shown in full. */
.v2-log {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

/* Stacked (phone) admin tables: only cells holding buttons wrap, so a row
   of action buttons never runs off-screen; text values stay beside their label. */
@media (max-width: 991.98px) {
    .v2-admin .table tbody td:has(.btn) {
        flex-wrap: wrap;
        white-space: normal !important;
    }
}
