/**
 * *** Tools - Shared Styles
 * *** Branded: Orange (#F26522) + Blue (#003366)
 */

/* CSS Variables */
:root {
    --primary: #F26522;
    --primary-dark: #D85A1B;
    --secondary: #003366;
    --secondary-light: #004080;
    --background: #F5F5F5;
    --surface: #FFFFFF;
    --text: #333333;
    --text-light: #666666;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --border: #E0E0E0;
    --shadow: rgba(0, 0, 0, 0.1);

    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

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

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

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page {
    padding: 2rem 0;
}

/* Header / Navigation */
.header {
    background: var(--secondary);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.7;
}

.nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav a {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav a:hover,
.nav a.active {
    background: var(--primary);
    color: white;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.25rem;
    color: var(--secondary);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
    border-left: 4px solid var(--primary);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }

/* Trend Indicators */
.trend {
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

/* Stat Label Tooltips */
.stat-label[title] {
    cursor: help;
    border-bottom: 1px dotted var(--text-light);
    display: inline-block;
}

.stat-label[title]:hover {
    color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-light);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    background: var(--surface);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.1);
}

.form-control::placeholder {
    color: #999;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
}

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

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--secondary);
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

tr:hover {
    background: #f8f9fa;
}

tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* Pipeline / Kanban */
.pipeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.pipeline-column {
    background: var(--background);
    border-radius: var(--border-radius);
    padding: 1rem;
    min-height: 400px;
}

.pipeline-header {
    font-weight: 600;
    color: var(--secondary);
    padding: 0.75rem;
    background: var(--surface);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pipeline-count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

.pipeline-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px var(--shadow);
    cursor: grab;
    transition: var(--transition);
    border-left: 3px solid var(--primary);
}

.pipeline-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.pipeline-card.stale {
    border-left-color: var(--warning);
}

.pipeline-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pipeline-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Tool Cards (Dashboard) */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.tool-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

.tool-title {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.tool-description {
    color: var(--text-light);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* Profile Card (Graduate Readiness) */
.profile-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 4px 16px var(--shadow);
}

.profile-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 1.5rem;
}

.profile-name {
    font-size: 1.75rem;
    color: var(--secondary);
}

.profile-program {
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.25rem;
}

.profile-section {
    margin-bottom: 1.5rem;
}

.profile-section-title {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-tag {
    display: inline-block;
    background: var(--background);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin: 0.25rem;
    font-size: 0.9rem;
    border: 1px solid var(--border);
}

.readiness-statement {
    background: #e8f5e9;
    border-left: 4px solid var(--success);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    font-style: italic;
    color: #2e7d32;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.25rem;
    color: var(--secondary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    line-height: 1;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Filters Bar */
.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--border-radius);
}

.filters .form-control {
    width: auto;
    min-width: 150px;
}

/* Actions Bar */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.actions-left,
.actions-right {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Flow Diagram (LMS Bridge) */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 2rem;
    flex-wrap: wrap;
}

.flow-step {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
    min-width: 180px;
}

.flow-step-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.flow-step-title {
    font-weight: 600;
    color: var(--secondary);
}

.flow-step-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.flow-arrow {
    font-size: 2rem;
    color: var(--primary);
    padding: 0 1rem;
}

/* Print Styles */
@media print {
    .header, .nav, .btn, .filters, .actions-bar {
        display: none !important;
    }

    body {
        background: white;
    }

    .profile-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Responsive */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .nav {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .flow-diagram {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
        padding: 0.5rem 0;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Enhanced Footer */
.enhanced-footer {
    background: var(--secondary);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.enhanced-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    font-weight: 600;
}

.footer-tagline {
    opacity: 0.7;
    font-size: 0.85rem;
}

.footer-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    cursor: pointer;
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-credit {
    opacity: 0.5;
    font-size: 0.8rem;
}

/* Roadmap Banner */
.roadmap-banner {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    margin-top: 2rem;
}

.roadmap-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.roadmap-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.roadmap-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.roadmap-item svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Simple CSS Charts */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.chart-title {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* CSS Bar Chart */
.css-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    width: 60px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.bar-track {
    flex: 1;
    height: 24px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
}

.bar-value {
    width: 45px;
    text-align: right;
    font-weight: 600;
    color: var(--secondary);
}

/* CSS Legend Chart */
.css-legend-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text);
}

.legend-value {
    font-weight: 600;
    color: var(--secondary);
}

/* Horizontal stacked bar */
.stacked-bar {
    display: flex;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.stacked-bar-segment {
    height: 100%;
}

@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

