/* Custom styles for Training Platform */

body {
    font-size: .875rem;
    background-color: #f5f7fa;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #adb5bd;
    padding: .75rem 1rem;
    border-radius: 0;
}

/* Collapse icon rotation */
.sidebar .nav-link[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
    transition: transform 0.2s;
}
.sidebar .nav-link .collapse-icon {
    transition: transform 0.2s;
    font-size: 0.7rem;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,.08);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255,255,255,.15);
}

.sidebar .nav-link i {
    margin-right: .5rem;
}

/* Main content */
main {
    padding-top: 4rem;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    transition: transform .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .card-body {
    padding: 1.25rem;
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: .7;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: .8rem;
    color: #6c757d;
}

/* Table */
.table-container {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    padding: 1rem;
}

/* Progress */
.progress-container {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    padding: 1.5rem;
}

.progress-log {
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: .8rem;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: .5rem;
    padding: 1rem;
}

.progress-log .log-line {
    padding: .15rem 0;
    border-bottom: 1px solid #333;
}

.progress-log .log-success { color: #4ec9b0; }
.progress-log .log-fail { color: #f44747; }
.progress-log .log-info { color: #9cdcfe; }
.progress-log .log-warn { color: #ce9178; }

/* Status badges */
.status-badge {
    font-size: .75rem;
    padding: .25rem .5rem;
}

/* User form */
.form-container {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    padding: 2rem;
    max-width: 700px;
}

/* Settings form */
.settings-container {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    padding: 2rem;
}

/* Log detail */
.log-detail {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: .5rem;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: .8rem;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Flash messages */
.alert-floating {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    min-width: 300px;
}

/* Sort links */
.sort-link {
    white-space: nowrap;
    user-select: none;
}
.sort-link:hover {
    color: #0d6efd !important;
}

/* Search bar */
.search-bar {
    max-width: 300px;
}

/* Responsive */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        padding: 1rem;
    }
    main {
        margin-left: 0 !important;
    }
}
