/* ==========================================================================
   AMP (Assess My Program) - Modern Core Stylesheet & Design System
   Color Scheme: Clean Off-White Surfaces & AMP Blue (#0085bf)
   ========================================================================== */

:root {
    /* Brand Colors (Blue Palette) */
    --amp-primary: #0085bf;
    --amp-primary-dark: #006694;
    --amp-primary-darker: #004b6e;
    --amp-primary-light: #38bdf8;
    --amp-primary-soft: #e0f2fe;
    --amp-primary-subtle: #f0f9ff;

    /* Off-White & Neutral Surfaces */
    --amp-bg: #f6f8fb;
    --amp-surface: #ffffff;
    --amp-surface-alt: #eef3f8;
    --amp-border: #dce4ee;
    --amp-border-strong: #cbd5e1;

    /* Typography Colors */
    --amp-text: #0f172a;
    --amp-text-secondary: #334155;
    --amp-text-muted: #64748b;

    /* Semantic Accents */
    --amp-accent-warm: #f59e0b;
    --amp-danger: #dc2626;
    --amp-success: #16a34a;

    /* Elevation & Radii */
    --amp-radius-sm: 0.5rem;
    --amp-radius-md: 0.75rem;
    --amp-radius-lg: 1rem;
    --amp-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --amp-shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --amp-shadow-lg: 0 12px 28px -6px rgba(0, 133, 191, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
    --amp-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   1. Base Reset & Typography
   ========================================================================== */
html, body {
    height: 100%;
}

body,
body#aqs {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--amp-bg);
    color: var(--amp-text);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--amp-primary);
    text-decoration: none;
    transition: var(--amp-transition);
}

a:hover {
    color: var(--amp-primary-dark);
}

a img {
    border: none;
}

.wrapper {
    flex: 1 0 auto;
    padding: 0 1rem 2rem;
}

/* ==========================================================================
   2. Unified Header, Subbar & Legacy #logo Compatibility
   ========================================================================== */
.amp-header {
    background: linear-gradient(135deg, var(--amp-primary) 0%, var(--amp-primary-dark) 100%);
    color: #ffffff;
    box-shadow: var(--amp-shadow-md);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.amp-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.amp-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: #ffffff !important;
    text-decoration: none;
    outline: none;
}

.amp-brand:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
    border-radius: var(--amp-radius-sm);
}

.amp-brand-logo {
    background: rgba(0, 42, 66, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.3rem 0.6rem;
    border-radius: var(--amp-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.amp-brand-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.amp-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.amp-brand-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.amp-brand-subtitle {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

/* Subbar for Breadcrumbs & Context Info */
.amp-subbar {
    background-color: var(--amp-surface);
    border-bottom: 1px solid var(--amp-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.amp-subbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.amp-subbar .breadcrumb {
    margin-bottom: 0;
    font-weight: 500;
}

.amp-subbar .breadcrumb-item a {
    color: var(--amp-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.amp-subbar .breadcrumb-item.active {
    color: var(--amp-text-muted);
}

.amp-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Legacy #logo bar styling for unmigrated JSPs */
#logo {
    background: linear-gradient(135deg, var(--amp-primary) 0%, var(--amp-primary-dark) 100%) !important;
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--amp-radius-md);
    box-shadow: var(--amp-shadow-sm);
    margin-bottom: 1.25rem;
    gap: 0.6rem;
}

/* ==========================================================================
   3. Standardized Buttons
   ========================================================================== */
.btn-amp-primary {
    background-color: var(--amp-primary);
    border-color: var(--amp-primary);
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.6rem 1.35rem;
    border-radius: var(--amp-radius-sm);
    box-shadow: 0 2px 4px rgba(0, 133, 191, 0.2);
    transition: var(--amp-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-amp-primary:hover,
.btn-amp-primary:focus {
    background-color: var(--amp-primary-dark);
    border-color: var(--amp-primary-dark);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 133, 191, 0.28);
}

.btn-amp-outline {
    background-color: transparent;
    border: 1.5px solid var(--amp-primary);
    color: var(--amp-primary) !important;
    font-weight: 600;
    padding: 0.6rem 1.35rem;
    border-radius: var(--amp-radius-sm);
    transition: var(--amp-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-amp-outline:hover,
.btn-amp-outline:focus {
    background-color: var(--amp-primary-soft);
    color: var(--amp-primary-dark) !important;
    transform: translateY(-1px);
}

.btn-amp-header {
    background-color: #ffffff;
    color: var(--amp-primary-dark) !important;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
    border-radius: var(--amp-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-amp-header:hover {
    background-color: var(--amp-primary-soft);
    color: var(--amp-primary-darker) !important;
}

.btn-amp-header-outline {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--amp-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-amp-header-outline:hover {
    background-color: rgba(255, 255, 255, 0.24);
    color: #ffffff !important;
}

/* Fast Program Switcher in Header */
.amp-fast-switch-wrapper {
    position: relative;
    vertical-align: middle;
}

.amp-fast-switch-wrapper .bootstrap-select {
    width: auto !important;
}

.amp-fast-switch-wrapper .bootstrap-select > .btn-amp-header {
    background-color: #ffffff !important;
    color: var(--amp-primary-dark) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
    border-radius: var(--amp-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    outline: none !important;
}

.amp-fast-switch-wrapper .bootstrap-select > .btn-amp-header:hover,
.amp-fast-switch-wrapper .bootstrap-select > .btn-amp-header:focus,
.amp-fast-switch-wrapper .bootstrap-select.show > .btn-amp-header {
    background-color: var(--amp-primary-soft) !important;
    color: var(--amp-primary-darker) !important;
    border-color: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.amp-fast-switch-wrapper .bootstrap-select .dropdown-menu {
    min-width: 380px !important;
    max-width: 520px !important;
    font-size: 0.88rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--amp-radius-md) !important;
    padding-top: 0;
    margin-top: 6px;
    z-index: 1060;
}

.amp-fast-switch-wrapper .bootstrap-select .popover-title {
    background: #f1f5f9;
    padding: 0.55rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--amp-primary-dark);
    border-bottom: 1px solid #e2e8f0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.amp-fast-switch-wrapper .bootstrap-select .bs-searchbox {
    padding: 0.6rem 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.amp-fast-switch-wrapper .bootstrap-select .bs-searchbox .form-control {
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--amp-radius-sm);
    border: 1px solid #cbd5e1;
}

.amp-fast-switch-wrapper .bootstrap-select .bs-searchbox .form-control:focus {
    border-color: var(--amp-primary);
    box-shadow: 0 0 0 2px var(--amp-primary-soft);
}

.amp-fast-switch-wrapper .bootstrap-select .dropdown-item {
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    white-space: normal;
    word-break: break-word;
    border-bottom: 1px solid #f8fafc;
    color: #1e293b;
}

.amp-fast-switch-wrapper .bootstrap-select .dropdown-item:hover,
.amp-fast-switch-wrapper .bootstrap-select .dropdown-item:focus,
.amp-fast-switch-wrapper .bootstrap-select .dropdown-item.active {
    background-color: var(--amp-primary-subtle) !important;
    color: var(--amp-primary-dark) !important;
}

.amp-fast-switch-wrapper .bootstrap-select .dropdown-item small.text-muted {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--amp-primary) !important;
    margin-left: 0.4rem;
}

/* ==========================================================================
   4. Hero Section & Section Headings (home.jsp)
   ========================================================================== */
.amp-main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
    width: 100%;
    flex: 1 0 auto;
}

.amp-main-container-wide {
    max-width: 1560px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
    width: 100%;
    flex: 1 0 auto;
}

.amp-hero {
    background: linear-gradient(135deg, #ffffff 0%, var(--amp-primary-subtle) 55%, var(--amp-primary-soft) 100%);
    border: 1px solid var(--amp-border);
    border-radius: var(--amp-radius-lg);
    padding: 3rem 2.5rem;
    box-shadow: var(--amp-shadow-md);
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.amp-hero::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 133, 191, 0.12) 0%, rgba(0, 133, 191, 0) 70%);
    pointer-events: none;
}

.amp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background-color: var(--amp-primary-soft);
    color: var(--amp-primary-dark);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.amp-hero-title {
    color: var(--amp-text);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.amp-hero-title span {
    color: var(--amp-primary);
}

.amp-hero-lead {
    color: var(--amp-text-secondary);
    font-size: 1.1rem;
    max-width: 780px;
    margin-bottom: 1.75rem;
}

.amp-section-header {
    margin-bottom: 1.75rem;
}

.amp-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--amp-text);
    letter-spacing: -0.015em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.amp-section-title i {
    color: var(--amp-primary);
}

.amp-section-subtitle {
    color: var(--amp-text-muted);
    font-size: 1rem;
    margin-bottom: 0;
}

/* ==========================================================================
   5. 6-Card Workflow Grid & Feature Cards (home.jsp)
   ========================================================================== */
.amp-step-card {
    background-color: var(--amp-surface);
    border: 1px solid var(--amp-border);
    border-radius: var(--amp-radius-md);
    box-shadow: var(--amp-shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--amp-transition);
    position: relative;
}

.amp-step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--amp-shadow-lg);
    border-color: var(--amp-primary);
}

.amp-step-media {
    position: relative;
    height: 140px;
    background-color: var(--amp-surface-alt);
    overflow: hidden;
    border-bottom: 1px solid var(--amp-border);
}

.amp-step-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.amp-step-card:hover .amp-step-media img {
    transform: scale(1.04);
}

.amp-step-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(0, 75, 110, 0.45) 100%);
}

.amp-step-number {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: var(--amp-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.amp-step-icon-badge {
    position: absolute;
    bottom: 0.65rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.94);
    color: var(--amp-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.amp-step-body {
    padding: 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.amp-step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--amp-text);
    margin-bottom: 0.5rem;
}

.amp-step-desc {
    color: var(--amp-text-secondary);
    font-size: 0.94rem;
    margin-bottom: 1rem;
    flex: 1 1 auto;
}

.amp-step-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--amp-border);
}

.amp-task-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--amp-primary-dark);
    background-color: var(--amp-primary-subtle);
    border: 1px solid #bae6fd;
    padding: 0.3rem 0.65rem;
    border-radius: var(--amp-radius-sm);
    transition: var(--amp-transition);
}

.amp-task-chip:hover {
    background-color: var(--amp-primary);
    border-color: var(--amp-primary);
    color: #ffffff !important;
}

/* Highlight & Feature Cards */
.amp-feature-card {
    background-color: var(--amp-surface);
    border: 1px solid var(--amp-border);
    border-radius: var(--amp-radius-md);
    padding: 1.5rem;
    height: 100%;
    box-shadow: var(--amp-shadow-sm);
    transition: var(--amp-transition);
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
}

.amp-feature-card:hover {
    box-shadow: var(--amp-shadow-md);
    border-color: var(--amp-border-strong);
    transform: translateY(-2px);
}

.amp-feature-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: var(--amp-radius-md);
    background-color: var(--amp-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
}

.amp-feature-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.amp-callout-banner {
    background: linear-gradient(135deg, var(--amp-primary-darker) 0%, var(--amp-primary) 100%);
    color: #ffffff;
    border-radius: var(--amp-radius-lg);
    padding: 2.25rem;
    box-shadow: var(--amp-shadow-md);
}

/* ==========================================================================
   6. Authentication & Program Selection Cards (index.jsp)
   ========================================================================== */
.amp-auth-wrapper {
    max-width: 460px;
    margin: 1rem auto 2.5rem;
}

.amp-workspace-wrapper {
    max-width: 1120px;
    margin: 1rem auto 3rem;
}

.amp-card {
    background-color: var(--amp-surface);
    border: 1px solid var(--amp-border);
    border-radius: var(--amp-radius-lg);
    box-shadow: var(--amp-shadow-md);
    overflow: visible;
}

.amp-card-accent {
    height: 5px;
    background: linear-gradient(90deg, var(--amp-primary) 0%, var(--amp-primary-light) 100%);
    border-top-left-radius: var(--amp-radius-lg);
    border-top-right-radius: var(--amp-radius-lg);
}

.amp-card-body {
    padding: 2.25rem;
}

.amp-input-group .input-group-text {
    background-color: var(--amp-surface-alt);
    border-color: var(--amp-border-strong);
    color: var(--amp-text-muted);
}

.amp-form-control,
.amp-input-group .form-control,
.amp-form-select {
    border-color: var(--amp-border-strong);
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    border-radius: var(--amp-radius-sm);
    color: var(--amp-text);
    transition: var(--amp-transition);
}

.amp-form-control:focus,
.amp-input-group .form-control:focus,
.amp-form-select:focus {
    border-color: var(--amp-primary);
    box-shadow: 0 0 0 0.22rem rgba(0, 133, 191, 0.18);
}

/* Bootstrap-select modern alignment & dropdown menu fix */
.bootstrap-select > .dropdown-toggle {
    border: 1px solid var(--amp-border-strong) !important;
    background-color: var(--amp-surface) !important;
    padding: 0.625rem 0.875rem !important;
    font-size: 0.95rem !important;
    border-radius: var(--amp-radius-sm) !important;
    color: var(--amp-text) !important;
}

.bootstrap-select > .dropdown-toggle:focus,
.bootstrap-select.show > .dropdown-toggle {
    border-color: var(--amp-primary) !important;
    box-shadow: 0 0 0 0.22rem rgba(0, 133, 191, 0.18) !important;
    outline: none !important;
}

.bootstrap-select > .dropdown-menu {
    z-index: 1060 !important;
    border: 1px solid var(--amp-border-strong);
    border-radius: var(--amp-radius-sm);
    box-shadow: var(--amp-shadow-lg);
    background-color: var(--amp-surface);
    padding-top: 0;
}

.bootstrap-select .bs-searchbox {
    padding: 0.5rem 0.65rem;
    background-color: var(--amp-surface);
    border-bottom: 1px solid var(--amp-border);
    position: sticky;
    top: 0;
    z-index: 2;
}

.bootstrap-select .dropdown-menu.inner {
    position: static !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0 !important;
    margin: 0 !important;
}

.bootstrap-select .dropdown-item.active,
.bootstrap-select .dropdown-item:active {
    background-color: var(--amp-primary) !important;
    color: #ffffff !important;
}

.amp-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--amp-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.25rem 0;
}

.amp-divider::before,
.amp-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--amp-border);
}

.amp-divider:not(:empty)::before {
    margin-right: 0.85rem;
}

.amp-divider:not(:empty)::after {
    margin-left: 0.85rem;
}

/* ==========================================================================
   6b. Task Selection Tabs & Action Cards (doAssessment.jsp)
   ========================================================================== */
.amp-tabs-container {
    background-color: var(--amp-surface-alt);
    border: 1px solid var(--amp-border);
    border-radius: var(--amp-radius-md);
    padding: 0.45rem;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.amp-tabs .nav-link {
    color: var(--amp-text-secondary);
    background-color: transparent;
    border: none;
    border-radius: var(--amp-radius-sm);
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    transition: var(--amp-transition);
}

.amp-tabs .nav-link:hover {
    color: var(--amp-primary-dark);
    background-color: rgba(255, 255, 255, 0.65);
}

.amp-tabs .nav-link.active {
    background-color: var(--amp-primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 133, 191, 0.25);
}

.amp-tabs .amp-tab-count {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.08);
    color: var(--amp-text-secondary);
    transition: var(--amp-transition);
}

.amp-tabs .nav-link.active .amp-tab-count {
    background-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.amp-action-card {
    background-color: var(--amp-surface);
    border: 1px solid var(--amp-border);
    border-radius: var(--amp-radius-md);
    padding: 1.4rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--amp-shadow-sm);
    transition: var(--amp-transition);
    color: var(--amp-text) !important;
    text-decoration: none !important;
    position: relative;
}

.amp-action-card:hover,
.amp-action-card:focus {
    transform: translateY(-4px);
    border-color: var(--amp-primary);
    box-shadow: var(--amp-shadow-lg);
    color: var(--amp-text) !important;
}

.amp-action-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.amp-action-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--amp-radius-sm);
    background-color: var(--amp-primary-soft);
    border: 1px solid #bae6fd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem;
    flex-shrink: 0;
    transition: var(--amp-transition);
}

.amp-action-card:hover .amp-action-icon {
    background-color: var(--amp-primary-subtle);
    border-color: var(--amp-primary);
}

.amp-action-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    float: none;
    padding: 0;
}

.amp-action-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--amp-surface-alt);
    color: var(--amp-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--amp-transition);
}

.amp-action-card:hover .amp-action-arrow {
    background-color: var(--amp-primary);
    color: #ffffff;
    transform: translate(2px, -2px);
}

.amp-action-tag {
    display: inline-block;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--amp-primary-dark);
    background-color: var(--amp-primary-subtle);
    border: 1px solid #bae6fd;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    margin-bottom: 0.45rem;
}

.amp-action-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--amp-text);
    margin-bottom: 0.45rem;
    line-height: 1.35;
}

.amp-action-card:hover .amp-action-title {
    color: var(--amp-primary-dark);
}

.amp-action-desc {
    color: var(--amp-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.amp-action-footer {
    padding-top: 0.75rem;
    border-top: 1px dashed var(--amp-border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--amp-primary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ==========================================================================
   6c. Hierarchical Goal & Objective Cards (lglo.jsp)
   ========================================================================== */
.amp-goal-card {
    background-color: var(--amp-surface);
    border: 1px solid var(--amp-border);
    border-radius: var(--amp-radius-md);
    box-shadow: var(--amp-shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: var(--amp-transition);
}

.amp-goal-card:hover {
    border-color: var(--amp-border-strong);
    box-shadow: var(--amp-shadow-md);
}

.amp-goal-header {
    background: linear-gradient(90deg, var(--amp-primary-subtle) 0%, #ffffff 100%);
    border-bottom: 1px solid transparent;
    border-left: 4px solid var(--amp-primary);
    padding: 1rem 1.35rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.amp-goal-card:has(.amp-goal-body.show) .amp-goal-header {
    border-bottom-color: var(--amp-border);
}

.amp-collapse-toggle {
    width: 30px;
    height: 30px;
    border-radius: var(--amp-radius-sm);
    border: 1px solid #bae6fd;
    background-color: #ffffff;
    color: var(--amp-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    margin-top: 0.05rem;
    cursor: pointer;
    transition: var(--amp-transition);
    box-shadow: 0 1px 2px rgba(0, 133, 191, 0.08);
}

.amp-collapse-toggle:hover {
    background-color: var(--amp-primary);
    border-color: var(--amp-primary);
    color: #ffffff;
}

.amp-collapse-toggle i {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.amp-goal-card:has(.amp-goal-body.show) .amp-collapse-toggle,
.amp-collapse-toggle[aria-expanded="true"] {
    background-color: var(--amp-primary);
    border-color: var(--amp-primary);
    color: #ffffff;
}

.amp-goal-card:has(.amp-goal-body.show) .amp-collapse-toggle i,
.amp-collapse-toggle[aria-expanded="true"] i {
    transform: rotate(90deg);
}

.amp-goal-trigger {
    cursor: pointer;
    user-select: none;
}

@media print {
    .amp-goal-body.collapse {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
    }
    .amp-collapse-toggle {
        display: none !important;
    }
}

.amp-goal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--amp-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    padding: 0.28rem 0.7rem;
    border-radius: var(--amp-radius-sm);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.amp-goal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--amp-text);
    line-height: 1.45;
    margin: 0;
}

.amp-lo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.amp-lo-item {
    padding: 0.95rem 1.35rem 0.95rem 2.25rem;
    border-bottom: 1px solid var(--amp-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    background-color: var(--amp-surface);
    transition: background-color 0.15s ease;
}

.amp-lo-item:last-child {
    border-bottom: none;
}

.amp-lo-item:hover {
    background-color: #fafcfe;
}

.amp-lo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--amp-primary-soft);
    color: var(--amp-primary-dark);
    border: 1px solid #bae6fd;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--amp-radius-sm);
    flex-shrink: 0;
    margin-top: 0.12rem;
}

.amp-lo-text {
    color: var(--amp-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.amp-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--amp-radius-sm);
    border: 1px solid var(--amp-border);
    background-color: var(--amp-surface);
    color: var(--amp-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--amp-transition);
    cursor: pointer;
}

.amp-icon-btn:hover {
    background-color: var(--amp-primary-soft);
    border-color: var(--amp-primary);
    color: var(--amp-primary-dark);
}

.amp-icon-btn-danger:hover {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: var(--amp-danger);
}

.amp-inline-drawer {
    background-color: var(--amp-surface-alt);
    border-top: 1px solid var(--amp-border);
    padding: 1.15rem 1.35rem 1.15rem 2.25rem;
}

.amp-goal-footer {
    background-color: #fbfcfe;
    border-top: 1px dashed var(--amp-border);
    padding: 0.65rem 1.35rem 0.65rem 2.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   6d. Term Chips & Cycle Cards (cycles.jsp)
   ========================================================================== */
.amp-chip-container {
    min-height: 52px;
    background-color: var(--amp-surface);
    border: 1px dashed var(--amp-border-strong);
    border-radius: var(--amp-radius-sm);
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    transition: var(--amp-transition);
}

.amp-chip-container.has-chips {
    border-style: solid;
    border-color: var(--amp-border);
    background-color: #fbfdff;
}

.amp-term-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background-color: var(--amp-primary-soft);
    color: var(--amp-primary-darker);
    border: 1px solid #7dd3fc;
    border-radius: 999px;
    padding: 0.3rem 0.4rem 0.3rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 133, 191, 0.08);
    animation: ampChipIn 0.15s ease-out;
}

@keyframes ampChipIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.amp-term-chip-remove {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 102, 148, 0.14);
    color: var(--amp-primary-darker);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--amp-transition);
}

.amp-term-chip-remove:hover {
    background-color: var(--amp-danger);
    color: #ffffff;
}

.amp-term-chip-readonly {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--amp-primary-subtle);
    color: var(--amp-primary-dark);
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: 0.32rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ==========================================================================
   6f. Assessment Questions Grid & DataTables Styling (questions.jsp)
   ========================================================================== */
.amp-filter-bar {
    background-color: var(--amp-surface);
    border: 1px solid var(--amp-border);
    border-radius: var(--amp-radius-md);
    padding: 1rem 1.35rem;
    box-shadow: var(--amp-shadow-sm);
    margin-bottom: 1.25rem;
}

.amp-table-card {
    background-color: var(--amp-surface);
    border: 1px solid var(--amp-border);
    border-radius: var(--amp-radius-md);
    box-shadow: var(--amp-shadow-sm);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.amp-table-card-header {
    background: linear-gradient(90deg, var(--amp-surface-alt) 0%, #ffffff 100%);
    border-bottom: 1px solid var(--amp-border);
    padding: 1rem 1.35rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.amp-question-table {
    margin-bottom: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
    width: 100% !important;
}

.amp-question-table thead th {
    background-color: var(--amp-surface-alt) !important;
    color: var(--amp-text-muted) !important;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.7rem 0.55rem !important;
    padding-right: 1.4rem !important;
    border-bottom: 2px solid var(--amp-border-strong) !important;
    border-top: none !important;
    white-space: nowrap;
    vertical-align: middle;
}

.amp-question-table thead th:last-child {
    padding-right: 0.75rem !important;
}

.amp-question-table tbody td {
    padding: 0.65rem 0.55rem !important;
    vertical-align: middle;
    border-bottom: 1px solid var(--amp-border) !important;
    font-size: 0.875rem;
    color: var(--amp-text);
}

.amp-question-table tbody td:last-child {
    padding-right: 0.75rem !important;
}

.amp-question-table tbody tr:hover td {
    background-color: #f8fbff !important;
}

.amp-question-table tbody tr.amp-row-editing td {
    background-color: var(--amp-primary-soft) !important;
}

.amp-qtype-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background-color: var(--amp-surface-alt);
    color: var(--amp-primary-dark);
    border: 1px solid var(--amp-border-strong);
    border-radius: var(--amp-radius-sm);
    padding: 0.2rem 0.55rem;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.amp-param-pill {
    display: inline-block;
    font-size: 0.74rem;
    color: var(--amp-text-muted);
    background-color: #f1f5f9;
    border-radius: 4px;
    padding: 0.12rem 0.45rem;
    margin-top: 0.2rem;
    white-space: nowrap;
}

/* DataTables wrapper polish */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 0.85rem 1.25rem 0.5rem;
    font-size: 0.875rem;
    color: var(--amp-text-muted);
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--amp-border-strong) !important;
    border-radius: var(--amp-radius-sm) !important;
    padding: 0.35rem 0.7rem !important;
    margin-left: 0.5rem !important;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--amp-primary) !important;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 133, 191, 0.15);
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--amp-border-strong) !important;
    border-radius: var(--amp-radius-sm) !important;
    padding: 0.25rem 1.75rem 0.25rem 0.5rem !important;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 0.85rem 1.25rem !important;
    font-size: 0.85rem;
    color: var(--amp-text-muted) !important;
}

/* ==========================================================================
   7. Footer Styling (footer.jsp)
   ========================================================================== */
.amp-footer {
    background-color: var(--amp-surface);
    border-top: 1px solid var(--amp-border);
    color: var(--amp-text-muted);
    font-size: 0.875rem;
    margin-top: auto;
    padding: 1.5rem 0;
}

.amp-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* ==========================================================================
   8. Legacy Classes Preserved for Unmigrated JSP Reports & Tables
   ========================================================================== */
.clear {
    clear: both;
}

.task {
    color: var(--amp-primary);
    font-weight: 500;
}

.sel {
    background: var(--amp-primary-soft);
    border: 1px solid var(--amp-primary);
}

.unsel {
    background: var(--amp-surface-alt);
    border: none;
}

tr.yellow td {
    border-top: 1px solid #fb7a31;
    border-bottom: 1px solid #fb7a31;
    background: #fef9c3;
}

tr.row0 td,
tr.row0 th {
    border-bottom: 1px solid var(--amp-border);
    padding: 0.35rem 0.6rem;
    background: var(--amp-primary-soft);
}

tr.row1 td,
tr.row1 th {
    border-bottom: 1px solid var(--amp-border);
    padding: 0.35rem 0.6rem;
}

.nobr {
    white-space: nowrap;
}

.hanging {
    margin-left: 0.2in;
    text-indent: -0.2in;
    margin-bottom: -15px;
}

.warning,
.amp-weakness-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    background-color: #ffe4e6 !important;
    color: #be123c !important;
    border: 1px solid #fb7185 !important;
    border-radius: 6px;
    padding: 0.15rem 0.52rem;
    font-weight: 800 !important;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    box-shadow: 0 1px 2px rgba(225, 29, 72, 0.14);
    line-height: 1.3;
}

.amp-weakness-pill i,
.warning i {
    color: #ff4500 !important;
    font-size: 0.92em;
    text-decoration: none !important;
    display: inline-block;
    filter: drop-shadow(0 1px 1px rgba(153, 27, 27, 0.25));
}

.warning:not(:has(i))::before {
    content: "\F33A";
    font-family: "bootstrap-icons" !important;
    color: #ff4500 !important;
    font-size: 0.92em;
    margin-right: 0.28rem;
    text-decoration: none !important;
    display: inline-block;
    filter: drop-shadow(0 1px 1px rgba(153, 27, 27, 0.25));
}

.table td.amp-score-below,
.table th.amp-score-below,
td.amp-score-below,
th.amp-score-below {
    background-color: #fff1f2 !important;
    color: #be123c !important;
    font-weight: 800 !important;
    box-shadow: inset 3px 0 0 #e11d48;
}

.table tbody tr:hover td.amp-score-below,
.table tbody tr:hover th.amp-score-below {
    background-color: #ffe4e6 !important;
}

img.actionicon {
    width: 34px;
    height: 36px;
    padding: 3px;
    float: left;
    vertical-align: middle;
}

button.delete {
    background: url('images/ic_delete.png');
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .amp-hero {
        padding: 2rem 1.35rem;
        margin-bottom: 2rem;
    }

    .amp-card-body {
        padding: 1.5rem;
    }

    .amp-header-inner {
        padding: 0.65rem 1rem;
    }

    .amp-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
