:root {
    --primary-color: #2c3e50;
    --primary-light: #34495e;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --border-radius: 10px;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --sidebar-width: 280px;
}

* {
    font-family: 'Noto Sans TC', sans-serif;
}

body {
    background-color: #f5f7fa;
    padding-top: 60px;
    color: var(--dark-color);
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-color);
}

.navbar-brand {
    font-weight: 700;
}

.navbar .dropdown-toggle {
    height: 38px;
    display: flex;
    align-items: center;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - 60px);
    background-color: white;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 100;
}

.sidebar .progress-card {
    padding: 1rem;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: white;
    margin-bottom: 1.5rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.2s;
}

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

.sidebar-nav i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

.section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 80px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

.section-title {
    margin: 0;
    font-weight: 700;
    color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Form Controls */
.form-check {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}

.form-check:hover {
    background-color: #f8f9fa;
}

.form-check-input {
    margin-top: 0.3rem;
}

.form-select {
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    border-color: #e1e5eb;
}

.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(44, 62, 80, 0.15);
    border-color: var(--primary-color);
}

.input-group {
    margin-bottom: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
}

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

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* Progress Bars and Status */
.progress {
    height: 12px;
    border-radius: 6px;
    background-color: #e9ecef;
    margin-bottom: 0.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.status-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 50rem;
}

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

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

.status-warning {
    background-color: var(--warning-color);
}

/* Summary Panel */
.summary-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    width: calc(100% - var(--sidebar-width));
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-status {
    display: flex;
    align-items: center;
}

.summary-text {
    margin-left: 1rem;
}

.summary-text h4 {
    margin: 0;
}

.summary-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

/* 課程格線 - 改進表單排版 */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
}

/* Animations and transitions */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s;
}

.fade-enter, .fade-leave-to {
    opacity: 0;
}

/* Custom Category Styles */
.category-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    margin-right: 1rem;
}

.category-completed .category-icon {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.category-incomplete .category-icon {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

/* English test specific */
.toeic-meter {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 1rem;
    position: relative;
}

.toeic-meter::before {
    content: "";
    position: absolute;
    left: 65.7%; /* 650/990 * 100% */
    height: 100%;
    width: 2px;
    background-color: var(--warning-color);
}

.toeic-meter::after {
    content: "";
    position: absolute;
    left: 75.8%; /* 750/990 * 100% */
    height: 100%;
    width: 2px;
    background-color: var(--success-color);
}

.toeic-level {
    height: 100%;
    border-radius: 4px;
    background-color: var(--secondary-color);
    transition: width 0.5s;
}

.toeic-markers {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}
.disabled-course {
    color: #6c757d;
    cursor: not-allowed;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    margin-top: 3rem;
    margin-left: var(--sidebar-width);
    margin-bottom: 5%;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer a {
    color: white;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer a:hover {
    opacity: 1;
    color: var(--light-color);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        left: -280px;
        transition: left 0.3s;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .summary-panel {
        width: 100%;
    }
    
    .toggle-sidebar {
        display: block !important;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }
    .footer {
        margin-left: 0;
        padding-bottom: 5rem;
    }
}

@media print {
    .footer {
        display: none !important;
    }
}