:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --border-color: #d1d9e6;
    --text-primary: #1a1e23;
    --text-secondary: #5e6c84;
    --accent-blue: #0052cc;
    --accent-purple: #6554c0;
    --accent-green: #36b37e;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.2);
    --transition-speed: 0.3s;
    --status-red: #ff5630;
    --status-yellow: #ffab00;
    --status-green: #36b37e;
    --status-blue: #0052cc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Sidebar Styling */
aside {
    width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all var(--transition-speed);
    font-size: 0.9rem;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    background: rgba(0, 82, 204, 0.08);
    color: var(--accent-blue);
    font-weight: 600;
}

/* ── Learning Hub Accordion ──────────────────────────────── */
.hub-accordion {
    margin-top: 20px;
}

.hub-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: transparent;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}

.hub-accordion-header:hover {
    background: rgba(0, 82, 204, 0.06);
    color: var(--accent-blue);
}

.hub-accordion-header.active {
    color: var(--accent-blue);
    background: rgba(0, 82, 204, 0.06);
}

.hub-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity    0.3s ease;
    opacity: 0;
    border-left: 2px solid rgba(0, 82, 204, 0.18);
    margin-left: 16px;
    margin-top: 2px;
}

.hub-accordion-body.open {
    max-height: 680px;  /* fits 11 items + Mobility Domain sub-label */
    opacity: 1;
}

.hub-accordion-body .hub-item {
    padding: 9px 14px;
    font-size: 0.85rem;
    border-radius: 6px;
    margin-bottom: 1px;
}

.hub-accordion-body .hub-item:hover {
    background: rgba(0, 82, 204, 0.07);
    color: var(--accent-blue);
    padding-left: 18px;   /* subtle indent on hover */
    transition: padding-left 0.15s ease;
}

/* Main Content Area */
main {
    margin-left: 280px;
    padding: 0;
    min-height: 100vh;
}

.top-bar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 40px;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-section {
    margin-bottom: 30px;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

/* Intent & Value Cards */
.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-purple);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.card-content {
    font-size: 1.1rem;
}

/* Practice Table */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(48, 54, 61, 0.5);
    padding: 16px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.pg-col { width: 50px; text-align: center; font-weight: 700; color: var(--accent-blue); }
.id-col { width: 100px; font-weight: 600; }
.stmt-col { width: 50%; }
.artifact-col { width: 15%; color: var(--text-secondary); font-style: italic; font-size: 0.85rem; }

/* Dashboard Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-green);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* AI Advisor Button */
.btn-advice {
    background: linear-gradient(135deg, var(--accent-purple), #8a2be2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(188, 140, 255, 0.4);
}

.btn-advice:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(188, 140, 255, 0.6);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 40px;
    border: 1px solid var(--border-color);
    width: 60%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-height: 85vh;
    overflow-y: auto;
}

.close-modal {
    color: var(--text-secondary);
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--accent-blue);
}

.advice-section {
    margin-bottom: 25px;
}

.advice-title {
    color: var(--accent-blue);
    font-size: 1.4rem;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-purple);
    padding-left: 15px;
}

.paper-card {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.paper-title { font-weight: 700; color: var(--accent-blue); margin-bottom: 5px; }
.paper-summ { font-size: 0.9rem; color: var(--text-secondary); }

/* Rating Styles */
.stat-cell {
    text-align: center;
    font-weight: 600;
    color: white !important;
}

.rating-red { background: var(--status-red); }
.rating-yellow { background: var(--status-yellow); }
.rating-green { background: var(--status-green); }
.rating-blue { background: var(--status-blue); }

.score-cell:focus {
    background: rgba(0, 82, 204, 0.05);
    outline: none;
    border-radius: 4px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.5s ease forwards;
}
/* Neural Chat Component */
.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(101, 84, 192, 0.4);
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-bubble:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 40px rgba(101, 84, 192, 0.6);
}

.chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 520px;
    height: auto;
    min-height: 420px;
    max-height: calc(100vh - 130px);   /* never taller than screen - bottom offset */
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    z-index: 2000;
    overflow: hidden;
    animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-header {
    background: linear-gradient(135deg, #1a237e, var(--accent-blue));
    color: white;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-body {
    flex: 1 1 0;
    min-height: 0;           /* critical: allows flex child to shrink below content size */
    padding: 16px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.chat-body::-webkit-scrollbar {
    width: 5px;
}
.chat-body::-webkit-scrollbar-track { background: #f5f5f5; }
.chat-body::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }
.chat-body::-webkit-scrollbar-thumb:hover { background: #bbb; }

.msg {
    max-width: 95%;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.6;
    word-break: break-word;
}

.ai-msg {
    align-self: flex-start;
    background: #f4f5f8;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0,0,0,0.05);
}

.user-msg {
    align-self: flex-end;
    background: var(--accent-blue);
    color: white;
    border-bottom-right-radius: 4px;
    max-width: 75%;
}

.chat-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.03);
}

/* Input — shared selector covers BOTH iEQMS and Mobility chat panels */
#chat-input,
#mobility-chat-input,
#audit-chat-input,
#sqe-chat-input,
#benchmark-chat-input,
#quality-chat-input {
    flex: 1;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: #fafbfc;
    transition: border-color 0.2s;
    min-height: 44px;
}

#chat-input:focus,
#mobility-chat-input:focus,
#audit-chat-input:focus,
#sqe-chat-input:focus {
    border-color: var(--accent-blue);
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,82,204,0.1), 0 0 0 1px var(--accent-blue);
}

/* Send button — shared selector */
#send-chat,
#mobility-send-chat,
#send-audit-chat,
#send-sqe-chat,
#send-benchmark-chat,
#send-quality-chat {
    background: var(--accent-blue);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#send-chat:hover,
#mobility-send-chat:hover,
#send-audit-chat:hover,
#send-sqe-chat:hover {
    background: #003d99;
    transform: scale(1.05);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px var(--accent-green);
}

.brain-icon {
    font-size: 1.5rem;
}
/* Training Module Styles */
.training-container {
    max-width: 1000px;
    margin: 0 auto;
}

.training-header {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 82, 204, 0.2);
}

.training-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.filter-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.st-select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: #f8f9fa;
    cursor: pointer;
    transition: 0.2s;
}

.st-select:focus {
    border-color: var(--accent-blue);
    background: white;
    outline: none;
}

.training-results {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.training-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.training-card:hover {
    transform: translateY(-5px);
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 30px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: white;
}

.level-0 { background: #666; }
.level-1 { background: var(--status-red); }
.level-2 { background: var(--status-yellow); color: #1a1e23; }
.level-3 { background: var(--status-blue); }
.level-4 { background: var(--accent-purple); }
.level-5 { background: var(--status-green); }

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--accent-blue);
}

.card-section {
    margin-bottom: 25px;
}

.section-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.artifact-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid transparent;
}

.artifact-item.present { border-color: rgba(54, 179, 126, 0.2); }
.artifact-item.missing { border-color: rgba(255, 86, 48, 0.2); opacity: 0.8; }

.artifact-status-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.present .artifact-status-icon { background: var(--status-green); color: white; }
.missing .artifact-status-icon { background: var(--status-red); color: white; }

.artifact-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.artifact-quality { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.artifact-notes { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; }

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.score-pill {
    padding: 8px 16px;
    background: rgba(0, 82, 204, 0.05);
    color: var(--accent-blue);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
}

.notes-pill {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-purple);
    cursor: pointer;
    text-decoration: underline;
}

.recommendation-box {
    margin-top: 20px;
    padding: 20px;
    background: rgba(101, 84, 192, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--accent-purple);
    font-size: 0.9rem;
    line-height: 1.6;
}

.no-results {
    text-align: center;
    padding: 80px;
    background: white;
    border-radius: 20px;
    border: 1px dashed var(--border-color);
}
/* Standards Library (Module 2) Styles */
.standards-layout {
    display: flex;
    gap: 0;
    margin: -40px; /* Offset main padding */
    height: 100vh;
    background: #ffffff;
}

.standards-sidebar {
    width: 350px;
    border-right: 1px solid var(--border-color);
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.standards-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.standards-sidebar-header h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--accent-blue);
}

.st-search {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: 0.2s;
}

.st-search:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.standards-tree {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.tree-group {
    margin-bottom: 20px;
}

.tree-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-secondary);
    padding: 10px 14px;
    letter-spacing: 1px;
}

.tree-group-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tree-item {
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tree-item:hover {
    background: rgba(0, 82, 204, 0.05);
}

.tree-item.active {
    background: var(--accent-blue);
    color: white;
}

.tree-code {
    font-weight: 800;
    font-size: 0.8rem;
}

.tree-item.active .tree-code { color: rgba(255, 255, 255, 0.8); }

.tree-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.standards-content {
    flex: 1;
    overflow-y: auto;
    padding: 60px;
    background: white;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.practice-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.l-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
}

.l-1 { background: var(--status-red); }
.l-2 { background: var(--status-yellow); color: #000; }
.l-3 { background: var(--status-blue); }
.l-4 { background: var(--accent-purple); }
.l-5 { background: var(--status-green); }

.detail-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.level-box {
    padding: 20px;
    background: #f0f7ff;
    border-left: 4px solid var(--accent-blue);
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
}

.artifact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.art-card {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.art-card:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.art-card.mandatory {
    border-left: 4px solid var(--status-red);
}

.art-card.optional {
    border-left: 4px solid var(--border-color);
}

.art-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.art-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent-blue);
}

.art-type-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #666;
}

.mandatory .art-type-badge {
    background: #ffebe6;
    color: #ff5630;
}

.art-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.4s ease forwards;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILITY LEARNING HUB — Shared Component Styles
   Used by: training-module-aero.js / rail.js / trans.js
═══════════════════════════════════════════════════════════════ */
.mob-hub { max-width: 1200px; margin: 0 auto; }

.mob-hub-hero {
    border-radius: 16px;
    padding: 32px 36px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.mob-stats-bar {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.mob-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 10px;
    border-right: 1px solid var(--border-color);
}
.mob-stat:last-child { border-right: none; }
.mob-stat-val { font-size: 1.45rem; font-weight: 900; }
.mob-stat-lbl { font-size: 0.72rem; color: var(--text-secondary); margin-top: 3px; text-align: center; }

.mob-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.mob-tab-btn {
    padding: 9px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.mob-tab-btn:hover  { border-color: var(--accent-blue); color: var(--accent-blue); background: #f0f4ff; }
.mob-tab-btn.active { background: var(--accent-blue);  color: #fff; border-color: var(--accent-blue); font-weight: 700; }

.mob-tab-pane { display: none; animation: slideUp 0.3s ease; }
.mob-tab-pane.active { display: block; }

.mob-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* 2-column grid */
.mob-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 900px) { .mob-grid-2 { grid-template-columns: 1fr; } }

/* 3-column grid */
.mob-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1100px) { .mob-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .mob-grid-3 { grid-template-columns: 1fr; } }

/* Standard Cards */
.mob-std-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    border-top: 3px solid var(--c, var(--accent-blue));
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}
.mob-std-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.mob-std-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.mob-std-badge {
    display: inline-block;
    font-size: 0.68rem; font-weight: 800;
    padding: 2px 8px; border-radius: 6px;
    margin-bottom: 2px;
}
.mob-std-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 5px;
}
.mob-std-list li {
    font-size: 0.79rem; color: #444; padding: 4px 0 4px 14px;
    position: relative; border-bottom: 1px solid #f5f5f5; line-height: 1.45;
}
.mob-std-list li::before { content: '▸'; position: absolute; left: 0; color: var(--c, var(--accent-blue)); font-size: 0.7rem; }

/* Timeline (Standards tab) */
.mob-timeline { display: flex; flex-direction: column; gap: 0; }
.mob-timeline-item { display: flex; gap: 16px; padding-bottom: 24px; position: relative; }
.mob-timeline-item::before {
    content: ''; position: absolute; left: 17px; top: 36px;
    width: 2px; height: calc(100% - 20px);
    background: var(--border-color);
}
.mob-timeline-item:last-child { padding-bottom: 0; }
.mob-timeline-item:last-child::before { display: none; }
.mob-timeline-marker {
    width: 36px; height: 36px; min-width: 36px;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 0.85rem; font-weight: 900;
    color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    position: relative; z-index: 1;
}
.mob-timeline-content {
    flex: 1; background: #fff; border: 1px solid var(--border-color);
    border-radius: 10px; padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.mob-timeline-content h3 { font-size: 0.95rem; margin-bottom: 2px; }

/* Tool Category Cards */
.mob-tool-cat {
    background: #fff; border: 1px solid var(--border-color);
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.mob-tool-cat-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; margin-bottom: 0;
}
.mob-tool-item {
    padding: 9px 14px;
    border-top: 1px solid var(--border-color);
}
.mob-tool-name { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.mob-tool-use  { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.45; }

/* Leader Cards */
.mob-leader-card {
    background: #fff; border: 1px solid var(--border-color);
    border-radius: 12px; padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}
.mob-leader-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.mob-bp-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.mob-bp-list li {
    font-size: 0.8rem; color: #444; padding: 5px 0 5px 16px;
    position: relative; border-bottom: 1px solid #f5f5f5; line-height: 1.5;
}
.mob-bp-list li::before { content: '✓'; position: absolute; left: 0; color: #36b37e; font-weight: 800; }

/* Glossary */
.mob-glossary-grid { display: flex; flex-direction: column; gap: 0; }
.mob-gloss-item {
    display: grid; grid-template-columns: 130px 1fr;
    gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: baseline;
}
.mob-gloss-item:last-child { border-bottom: none; }
.mob-gloss-term { font-size: 0.82rem; font-weight: 800; }
.mob-gloss-def  { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; }

/* ═══════════════════════════════════════════════════════════════
   AS9100D AUDIT MODULE — Component Styles
   as9100d-audit.js
═══════════════════════════════════════════════════════════════ */
.as9-wrap { max-width: 1280px; margin: 0 auto; }

/* Hero */
.as9-hero {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
    background: linear-gradient(135deg,#1b5e20 0%,#006644 60%,#004d40 100%);
    border-radius: 16px; padding: 28px 32px; margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2); flex-wrap: wrap;
}
.as9-hero-left  { display: flex; align-items: center; gap: 18px; min-width: 0; flex: 1; }
.as9-hero-icon  { font-size: 3rem; flex-shrink: 0; }
.as9-hero-title { font-size: 1.8rem; font-weight: 900; color: #fff; margin-bottom: 4px; }
.as9-hero-sub   { font-size: 0.9rem; color: rgba(255,255,255,0.8); margin-bottom: 10px; }
.as9-badges     { display: flex; gap: 6px; flex-wrap: wrap; }
.as9-badge      { background: rgba(255,255,255,0.15); color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }

/* Score card */
.as9-scorecard  { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.as9-score-ring { position: relative; width: 110px; height: 110px; }
.as9-ring-svg   { width: 100%; height: 100%; }
.as9-score-inner{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.as9-score-num  { font-size: 1.6rem; font-weight: 900; color: #fff; line-height: 1; }
.as9-score-lbl  { font-size: 0.65rem; color: rgba(255,255,255,0.85); margin-top: 2px; white-space: nowrap; }
.as9-score-meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.as9-export-btn, .as9-reset-btn {
    padding: 7px 14px; border: none; border-radius: 7px; font-family: inherit;
    font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.as9-export-btn { background: #fff; color: #006644; }
.as9-export-btn:hover { background: #e3fcef; transform: scale(1.03); }
.as9-reset-btn  { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.as9-reset-btn:hover { background: rgba(255,80,60,0.5); }

/* Section progress pills */
.as9-section-pills {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px; margin-bottom: 24px;
}
.as9-pill {
    background: #fff; border-radius: 10px; padding: 10px 14px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.06); cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.as9-pill:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.1); transform: translateY(-2px); }
.as9-pill-name  { font-size: 0.74rem; font-weight: 700; margin-bottom: 6px; }
.as9-pill-bar   { height: 5px; background: #eee; border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.as9-pill-fill  { height: 100%; border-radius: 4px; transition: width 0.4s; }
.as9-pill-score { font-size: 0.72rem; font-weight: 800; }

/* Section block */
.as9-section-block { margin-bottom: 28px; }
.as9-section-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 18px; border-radius: 10px 10px 0 0;
    color: #fff;
}
.as9-section-title  { font-weight: 800; font-size: 0.95rem; }
.as9-section-clauses{ font-size: 0.72rem; opacity: 0.8; }
.as9-clause-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
    gap: 0; border: 1px solid var(--border-color); border-top: none; border-radius: 0 0 10px 10px; overflow: hidden;
}

/* Clause card */
.as9-clause-card { background: #fff; border-bottom: 1px solid var(--border-color); }
.as9-clause-card:last-child { border-bottom: none; }
.as9-clause-head {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    flex-wrap: wrap; gap: 8px;
}
.as9-clause-id-badge  { font-size: 0.72rem; font-weight: 800; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.as9-clause-title { font-size: 0.88rem; font-weight: 700; flex: 1; min-width: 120px; color: var(--text-primary); }
.as9-clause-score { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.as9-mini-bar { width: 60px; height: 6px; background: #eee; border-radius: 4px; overflow: hidden; }

/* Accordion toggle */
.as9-clause-toggle {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 16px; background: #f8f9fa; border-top: 1px solid var(--border-color);
    cursor: pointer; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
    transition: background 0.2s;
}
.as9-clause-toggle:hover { background: #f0f4ff; color: var(--accent-blue); }
.as9-toggle-chevron { transition: transform 0.3s ease; }

/* Accordion body */
.as9-clause-body { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1); }
.as9-clause-body.open { max-height: 2400px; }
.as9-clause-body > * { padding: 0 16px; }
.as9-clause-body .as9-checkpoints,
.as9-clause-body .as9-doc-grid,
.as9-clause-body .as9-notes,
.as9-clause-body .as9-quick-tip { padding: 0 16px; }

.as9-sub-title {
    font-size: 0.78rem; font-weight: 800; color: var(--text-secondary);
    padding: 10px 16px 4px; text-transform: uppercase; letter-spacing: 0.5px;
}

/* Checkpoints */
.as9-checkpoints { display: flex; flex-direction: column; gap: 4px; padding-bottom: 4px; }
.as9-checkpoint {
    display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px;
    border-radius: 6px; cursor: pointer; transition: background 0.15s; border: 1px solid transparent;
}
.as9-checkpoint:hover      { background: #f0f4ff; }
.as9-checkpoint.checked    { background: #e3fcef; border-color: #b2dfdb; }
.as9-checkpoint input      { display: none; }
.as9-cp-box {
    width: 18px; height: 18px; min-width: 18px; border: 1.5px solid #ccc;
    border-radius: 4px; display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 900; color: #36b37e; background: #fff;
    transition: all 0.15s;
}
.as9-checkpoint.checked .as9-cp-box { background: #36b37e; color: #fff; border-color: #36b37e; }
.as9-cp-text { font-size: 0.8rem; color: #333; line-height: 1.5; }

/* Doc entry */
.as9-doc-grid { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }
.as9-doc-item { display: flex; flex-direction: column; gap: 3px; }
.as9-doc-label { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: #444; font-weight: 600; }
.as9-doc-icon  { font-size: 0.8rem; }
.as9-doc-input {
    padding: 7px 10px; border: 1.5px solid var(--border-color); border-radius: 7px;
    font-family: inherit; font-size: 0.78rem; color: var(--text-primary);
    background: #fafbfc; transition: border-color 0.2s, box-shadow 0.2s;
}
.as9-doc-input:focus { border-color: #006644; outline: none; box-shadow: 0 0 0 3px rgba(0,100,68,0.08); background: #fff; }
.as9-doc-input.has-value { background: #f0fdf4; border-color: #b2dfdb; }

/* Notes */
.as9-notes {
    width: 100%; padding: 8px 10px; border: 1.5px solid var(--border-color);
    border-radius: 7px; font-family: inherit; font-size: 0.78rem; color: #333;
    resize: vertical; min-height: 56px; margin: 0 0 10px;
    background: #fafbfc; transition: border-color 0.2s; box-sizing: border-box;
}
.as9-notes:focus { border-color: #006644; outline: none; box-shadow: 0 0 0 3px rgba(0,100,68,0.08); background: #fff; }

/* AI Quick Tip */
.as9-quick-tip {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: #f0edff; border-radius: 8px;
    border-left: 3px solid #6554c0; margin: 8px 16px 14px;
    cursor: pointer; transition: background 0.2s;
}
.as9-quick-tip:hover { background: #e8e0ff; }

/* ── AI Panel ── */
.as9-ai-panel {
    margin-top: 28px; border-radius: 16px; overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12); border: 1px solid var(--border-color);
}
.as9-ai-header {
    background: linear-gradient(135deg,#1b5e20,#006644);
    padding: 14px 20px; display: flex; justify-content: space-between; align-items: center;
}
.as9-ai-live {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.7rem; font-weight: 800; color: #fff; background: rgba(255,255,255,0.15);
    padding: 3px 10px; border-radius: 20px;
}
.as9-ai-body {
    max-height: 420px; overflow-y: auto; background: #f8f9fb;
    padding: 16px; display: flex; flex-direction: column; gap: 12px;
    scroll-behavior: smooth;
}
.as9-ai-body::-webkit-scrollbar { width: 5px; }
.as9-ai-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.as9-ai-msg {
    max-width: 95%; padding: 12px 16px; border-radius: 12px;
    font-size: 0.82rem; line-height: 1.6; word-break: break-word;
}
.as9-ai-bot  { align-self: flex-start; background: #fff; border: 1px solid rgba(0,0,0,0.07); border-radius: 12px 12px 12px 3px; }
.as9-ai-user { align-self: flex-end; background: #006644; color: #fff; border-radius: 12px 12px 3px 12px; max-width: 72%; }
.as9-ai-footer {
    background: #fff; border-top: 1px solid var(--border-color);
    padding: 12px 16px; display: flex; gap: 10px;
}
.as9-ai-input {
    flex: 1; padding: 11px 14px; border: 1.5px solid var(--border-color);
    border-radius: 10px; font-family: inherit; font-size: 0.85rem; outline: none;
    transition: border-color 0.2s;
}
.as9-ai-input:focus { border-color: #006644; box-shadow: 0 0 0 3px rgba(0,100,68,0.08); }
.as9-ai-send {
    background: #006644; color: #fff; border: none; width: 46px; height: 46px; min-width: 46px;
    border-radius: 10px; cursor: pointer; font-size: 1rem; display: flex;
    align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.15s;
}
.as9-ai-send:hover { background: #004d2e; transform: scale(1.05); }

/* Typing indicator */
.as9-typing { display: flex; gap: 4px; align-items: center; padding: 10px 16px !important; }
.as9-typing span {
    width: 7px; height: 7px; background: #006644; border-radius: 50%;
    animation: as9-bounce 1.2s infinite;
}
.as9-typing span:nth-child(2) { animation-delay: 0.2s; }
.as9-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes as9-bounce {
    0%,100% { transform: translateY(0); opacity: 1; }
    50%      { transform: translateY(-5px); opacity: 0.5; }
}


/* AI Advice Loading Animations */
.loader-bar {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    overflow: hidden;
    position: relative;
    border-radius: 2px;
    margin: 20px 0;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: var(--accent-blue);
    animation: loading-slide 1.5s infinite ease-in-out;
}

@keyframes loading-slide {
    0% { left: -50%; }
    100% { left: 150%; }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.animate-pulse {
    animation: pulse 2s infinite ease-in-out;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN PANEL — User Management Styles
   admin-panel.js
═══════════════════════════════════════════════════════════════ */
.adm-wrap { max-width: 1280px; margin: 0 auto; }

/* Hero */
.adm-hero {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #0d2b6b 0%, #0052cc 55%, #ffab00 100%);
    border-radius: 16px; padding: 28px 32px; margin-bottom: 22px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18); flex-wrap: wrap; gap: 16px;
}

/* Stats row */
.adm-stats {
    display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px;
}
@media (max-width: 900px) { .adm-stats { grid-template-columns: repeat(2,1fr); } }
.adm-stat-card {
    background: #fff; border-radius: 12px; padding: 18px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); display: flex; flex-direction: column; gap: 4px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.adm-stat-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }

/* Tabs */
.adm-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.adm-tab {
    padding: 9px 20px; border: 1.5px solid var(--border-color); border-radius: 8px;
    background: #fff; font-family: inherit; font-size: 0.82rem; font-weight: 600;
    color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.adm-tab:hover  { border-color: var(--accent-blue); color: var(--accent-blue); background: #f0f4ff; }
.adm-tab.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); font-weight: 700; }

/* Tab panes */
.adm-tab-pane { display: none; animation: slideUp 0.25s ease; }
.adm-tab-pane.active { display: block; }

/* Add/Edit Form Card */
.adm-form-card {
    background: #fff; border: 1.5px solid var(--border-color); border-radius: 14px;
    padding: 20px 22px; margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.adm-form-title { font-weight: 800; font-size: 1rem; color: var(--text-primary); margin-bottom: 16px; }
.adm-form-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
@media (max-width: 900px) { .adm-form-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .adm-form-grid { grid-template-columns: 1fr; } }

.adm-field { display: flex; flex-direction: column; gap: 5px; }
.adm-field label { font-size: 0.75rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.3px; }
.adm-field input, .adm-field select {
    padding: 9px 12px; border: 1.5px solid var(--border-color); border-radius: 8px;
    font-family: inherit; font-size: 0.85rem; color: var(--text-primary);
    background: #fafbfc; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.adm-field input:focus, .adm-field select:focus {
    border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(0,82,204,0.1); background: #fff;
}

/* Module checkboxes */
.adm-module-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px; max-height: 200px; overflow-y: auto; padding: 4px;
}
.adm-module-grid::-webkit-scrollbar { width: 4px; }
.adm-module-grid::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.adm-mod-check {
    display: flex; align-items: center; gap: 7px; padding: 6px 10px;
    border: 1px solid var(--border-color); border-radius: 7px;
    cursor: pointer; font-size: 0.78rem; color: #444; background: #fafbfc;
    transition: all 0.15s;
}
.adm-mod-check:hover { background: #f0f4ff; border-color: #b3c8f7; }
.adm-mod-check input[type="checkbox"] { accent-color: #0052cc; width: 14px; height: 14px; }
.adm-mod-check input:checked + span { color: #0052cc; font-weight: 600; }
.adm-mod-check:has(input:checked) { background: #eef3ff; border-color: #b3c8f7; }

.adm-form-actions {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-color);
}

/* Buttons */
.adm-btn {
    padding: 9px 18px; border-radius: 8px; font-family: inherit;
    font-size: 0.82rem; font-weight: 700; cursor: pointer; border: none;
    transition: all 0.2s;
}
.adm-btn-primary { background: var(--accent-blue); color: #fff; }
.adm-btn-primary:hover { background: #003d99; box-shadow: 0 4px 12px rgba(0,82,204,0.3); }
.adm-btn-ghost { background: #fff; color: var(--text-secondary); border: 1.5px solid var(--border-color); }
.adm-btn-ghost:hover { background: #f5f5f5; }

/* User table */
.adm-table-card {
    background: #fff; border: 1px solid var(--border-color); border-radius: 14px;
    overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.adm-table-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; gap: 10px;
}
.adm-search {
    padding: 8px 14px; border: 1.5px solid var(--border-color); border-radius: 8px;
    font-family: inherit; font-size: 0.82rem; outline: none; width: 220px;
    transition: border-color 0.2s;
}
.adm-search:focus { border-color: var(--accent-blue); }
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.adm-table thead th {
    background: #f8f9fb; padding: 10px 14px; text-align: left;
    font-size: 0.72rem; font-weight: 800; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border-color);
}
.adm-table tbody td { padding: 10px 14px; border-bottom: 1px solid #f5f5f5; vertical-align: middle; }
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-table tbody tr:hover { background: #f8f9fb; }

/* Action buttons */
.adm-action-btn {
    background: none; border: 1px solid var(--border-color); border-radius: 6px;
    padding: 4px 8px; cursor: pointer; font-size: 0.85rem; transition: all 0.15s;
}
.adm-action-btn:hover { background: #f5f5f5; transform: scale(1.08); }

/* 2‑col grid */
.adm-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
@media (max-width: 800px) { .adm-grid-2 { grid-template-columns: 1fr; } }

/* Role card */
.adm-role-card {
    background: #fff; border: 1px solid var(--border-color); border-radius: 12px;
    padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.adm-role-head { display: flex; align-items: center; gap: 12px; }

/* Info card */
.adm-info-card {
    background: #fff; border: 1px solid var(--border-color); border-radius: 12px;
    padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.adm-info-title { font-weight: 800; font-size: 1rem; margin-bottom: 14px; color: var(--text-primary); }
.adm-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-bottom: 1px solid #f5f5f5; font-size: 0.82rem; gap: 10px;
}
.adm-info-row:last-of-type { border-bottom: none; }
.adm-info-row span:first-child { color: #888; }

/* Toast notifications */
.adm-toast {
    position: fixed; bottom: 24px; right: 24px;
    padding: 12px 20px; border-radius: 10px; font-family: 'Outfit', sans-serif;
    font-size: 0.85rem; font-weight: 600; color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2); z-index: 99999;
    transform: translateY(80px); opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s ease;
    pointer-events: none;
}
.adm-toast.show { transform: translateY(0); opacity: 1; }
.adm-toast-success { background: #36b37e; }
.adm-toast-error   { background: #ff5630; }

/* ====== MOBILE RESPONSIVENESS (All Devices) ====== */

/* Hamburger Button Styling */
#mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--accent-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@media screen and (max-width: 1024px) {
    /* Menu Toggle Display */
    #mobile-menu-toggle {
        display: flex;
    }

    /* Sidebar Transitions */
    aside {
        left: -280px;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2101;
    }

    aside.mobile-open {
        left: 0;
    }

    /* Adjust Main Content Placement */
    main {
        margin-left: 0 !important;
    }

    .top-bar {
        padding: 15px 15px 15px 70px; /* Leave space for hamburger */
    }

    #page-content {
        padding: 20px 15px !important;
    }

    /* Info Cards Layout */
    .info-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Table Responsiveness */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        margin: 0 -5px;
    }

    table {
        min-width: 800px; /* Minimum width for horizontal scroll */
    }

    /* Dashboard Grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.6rem;
    }

    /* Floating AI Dock - Scale Down slightly */
    .chat-window {
        width: 90vw;
        right: 5vw;
        bottom: 85px;
        max-height: 70vh;
    }
}

@media screen and (max-width: 480px) {
    .page-title {
        font-size: 1.4rem;
    }

    .header-section {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start !important;
    }

    #btn-ai-advice {
        width: 100%;
        justify-content: center;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .modal-content {
        width: 92%;
        margin: 10% auto;
        padding: 20px;
    }
}

/* --- Specific Module Fixes for Mobile --- */

@media screen and (max-width: 1024px) {
    /* Training Module Filters */
    .training-filters {
        flex-direction: column;
        gap: 15px;
    }

    .training-header {
        padding: 20px;
        border-radius: 12px;
    }

    .artifact-grid {
        grid-template-columns: 1fr;
    }

    /* Standards Library Layout */
    .standards-layout {
        flex-direction: column;
        height: auto !important;
        margin: 0 !important;
    }

    .standards-sidebar {
        width: 100% !important;
        height: 350px !important;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        max-height: 40vh;
    }

    .standards-content {
        padding: 20px !important;
        min-height: 400px;
    }

    /* Top Bar adjustments */
    .top-bar > div {
        padding: 0 15px !important;
    }

    /* Fix for practice tables to ensure they don't force overflow on body */
    .table-container {
        width: 100%;
        max-width: calc(100vw - 30px);
    }
}

@media screen and (max-width: 768px) {
    /* Better spacing for Rating Dashboard headers */
    .table-container table thead th {
        font-size: 0.7rem;
        padding: 10px 4px;
        white-space: normal;
        line-height:1.2;
    }

    .pg-col {
        width: 35px !important;
        font-size: 0.8rem;
    }
    
    .id-col {
        width: 60px !important;
        font-size: 0.8rem;
    }
}

/* --- Dashboard Specific Mobile Overrides --- */

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.index-card {
    background: white;
    padding: 15px 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    min-width: 180px;
}

.dash-table {
    width: 100%;
    min-width: 1000px;
}

.pg-label-mob {
    display: none; /* Hidden on desktop */
}

.btn-dash-tips {
    background: transparent;
    border: 1.5px solid var(--accent-purple);
    color: var(--accent-purple);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-dash-tips:hover {
    background: var(--accent-purple);
    color: white;
}

/* Trends Section Styling */
.trends-section {
    background: #f1f5f9;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
}

.trends-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: center;
}

.trends-summary {
    text-align: center;
    border-right: 1px dashed #cbd5e1;
    padding-right: 30px;
}

.success-rate-big {
    font-size: 3rem;
    font-weight: 900;
    color: #1e1b4b;
}

.success-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4338ca;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.source-info {
    margin-top: 10px;
    font-size: 0.65rem;
    color: #64748b;
}

.smb-chip {
    margin-top: 20px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.smb-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e1b4b;
}

.smb-label {
    font-size: 0.6rem;
    color: #64748b;
    font-weight: 700;
}

.trends-header {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #1e1b4b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bars-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
}

.bar-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 1s ease-out;
}

@media screen and (max-width: 1024px) {
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .index-card {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
    }

    .index-card .stat-value {
        font-size: 1.8rem;
    }

    /* Table to Card Stack Transformation */
    .dash-table-wrap {
        border: none;
        background: transparent;
    }

    .dash-table, .dash-table thead, .dash-table tbody, .dash-table th, .dash-table td, .dash-table tr {
        display: block;
    }

    .dash-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .dash-table tr.pa-row {
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }

    .pa-name-cell {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        color: var(--accent-blue) !important;
        border-bottom: 1px solid #f0f0f0 !important;
        padding-bottom: 10px !important;
        margin-bottom: 10px;
    }

    .dash-table td {
        border: none;
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }

    .pg-label-mob {
        display: inline-block;
        font-size: 0.72rem;
        font-weight: 800;
        color: var(--text-secondary);
        text-transform: uppercase;
        margin-right: 10px;
    }

    .stat-cell {
        border-radius: 8px !important;
        margin: 2px 0;
        padding: 8px 12px !important;
        justify-content: space-between !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .pa-action-cell {
        justify-content: center !important;
        margin-top: 10px;
        border-top: 1px dashed #eee !important;
        padding-top: 15px !important;
    }

    .btn-dash-tips {
        width: 100%;
        padding: 12px;
    }
}

/* ── Responsive Web Design (Mobile Optimization) ────────────────────── */

#mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 2000;
    background: var(--accent-blue);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.3);
    border: none;
}

@media (max-width: 1024px) {
    #sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2100;
        background: white;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    
    #sidebar.mobile-open {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
        padding-top: 60px;
    }
    
    #mobile-menu-toggle {
        display: flex;
    }
    
    .top-bar {
        padding: 10px 15px;
        font-size: 0.9rem;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: white;
        border-bottom: 1px solid var(--border-color);
        z-index: 1000;
    }

    .header-section {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start !important;
    }

    .page-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .trends-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .trends-summary {
        border-right: none;
        border-bottom: 1px dashed #cbd5e1;
        padding-right: 0;
        padding-bottom: 20px;
    }

    .bars-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 650px;
    }

    .artifact-grid {
        grid-template-columns: 1fr;
    }

    .training-header, .training-filters {
        padding: 20px;
    }

    .training-filters {
        flex-direction: column;
    }

    .modal-content {
        width: 95% !important;
        padding: 20px;
        margin-top: 10%;
    }

    .chat-window {
        width: calc(100% - 40px) !important;
        height: 70vh !important;
        right: 20px !important;
        bottom: 80px !important;
        left: auto !important;
    }

    .launcher-dock {
        flex-direction: row-reverse !important;
        bottom: 15px !important;
        right: 15px !important;
        transform: scale(0.85);
        transform-origin: bottom right;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.4rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }
    
    .benchmarking-card {
        padding: 15px;
    }
}
