/* Base */
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f5f9;
    color: #2d3436;
}
a { text-decoration: none; }

/* Top header (replaces admin_dashboard's topbar/sidebar for this standalone portal) */
.portal-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 0 30px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.portal-header .brand { display: flex; align-items: center; gap: 12px; }
.portal-header .brand img { height: 38px; }
.portal-header .brand span { font-weight: 700; font-size: 1.1rem; color: #2d3436; }
.portal-header .user-info { display: flex; align-items: center; gap: 14px; }
.portal-header .user-info .name { font-weight: 600; color: #2d3436; }
.portal-header .logout-link { color: #d63031; font-weight: 600; font-size: 0.9rem; }

.portal-main {
    max-width: 1500px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6c5ce7 0%, #4834d4 100%);
}
.login-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    padding: 40px;
    width: 380px;
    text-align: center;
}
.login-box img.logo { height: 64px; margin-bottom: 16px; }
.login-box h1 { font-size: 1.3rem; margin: 0 0 6px; color: #2d3436; }
.login-box p.sub { color: #636e72; font-size: 0.9rem; margin: 0 0 25px; }
.login-box .form-group { text-align: left; margin-bottom: 16px; }
.login-box label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: #2d3436; }
.login-box input[type="text"], .login-box input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}
.login-box input:focus { outline: none; border-color: #6c5ce7; }
.login-box button {
    width: 100%;
    padding: 13px;
    background: #6c5ce7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 8px;
}
.login-box button:hover { background: #5849c4; }
.login-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: none;
}
.login-error.show { display: block; }

/* orientation.css equivalents, reused for the standalone portal */
.orientation-container { padding: 20px; }
.orientation-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; background: white; padding: 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.course-card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-5px); box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1); }
.course-banner { height: 160px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; position: relative; }
.course-banner i { font-size: 4rem; opacity: 0.8; }
.course-banner-img { width: 100%; height: 100%; object-fit: cover; }
.course-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.course-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; color: #2d3436; }
.course-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: #636e72; margin-bottom: 15px; }
.progress-container { margin-top: auto; margin-bottom: 0; padding-top: 15px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 5px; color: #2d3436; }
.progress-bar { height: 8px; background: #dfe6e9; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: #6c5ce7; transition: width 0.5s ease; }
.course-footer { padding: 15px 20px; background: #f9f9f9; border-top: 1px solid #eee; display: flex; justify-content: flex-end; }
.btn-start { background: #6c5ce7; color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.2s; text-decoration: none; display: inline-block; }
.btn-start:hover { background: #5849c4; }
.btn-view-results { background: transparent; border: 2px solid #6c5ce7; color: #6c5ce7; }
.btn-view-results:hover { background: #f0efff; }

.status-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; display: inline-block; }
.status-badge.not-started { background: #f1f2f6; color: #636e72; }
.status-badge.in-progress { background: #e1f5fe; color: #0288d1; }
.status-badge.completed { background: #e8f5e9; color: #2e7d32; }
.status-badge.failed { background: #ffebee; color: #c62828; }

.lesson-viewer { max-width: 1400px; margin: 0 auto; background: white; border-radius: 15px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1); overflow: hidden; }
.slide-area { position: relative; background: #fff; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.slide-image { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-controls { padding: 20px; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.slide-counter { font-weight: 600; color: #2d3436; }
.viewer-actions { display: flex; gap: 10px; }
.btn-nav { background: #f1f2f6; border: none; padding: 10px 15px; border-radius: 8px; cursor: pointer; color: #2d3436; }
.btn-nav:hover { background: #dfe4ea; }
.btn-nav:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-quiz { background: #00b894; color: white; }
.btn-quiz:hover { background: #00a382; }

.quiz-container { max-width: 800px; margin: 0 auto; padding: 30px; background: white; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); }
.question-card { margin-bottom: 25px; padding: 20px; border: 1px solid #eee; border-radius: 10px; }
.question-text { font-size: 1.1rem; font-weight: 600; margin-bottom: 15px; }
.option-group { display: flex; flex-direction: column; gap: 10px; }
.option-item { padding: 12px 15px; background: #f9f9f9; border: 1px solid #eee; border-radius: 8px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; }
.option-item:hover { background: #f0f0f0; }
.option-item input { margin-right: 15px; }
.option-item.selected { border-color: #6c5ce7; background: #f0efff; }
.fill-blank-input { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; }
.fill-blank-input:focus { border-color: #6c5ce7; outline: none; }
.matching-group { display: flex; flex-direction: column; gap: 12px; }
.matching-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 15px; background: #f9f9f9; border: 1px solid #eee; border-radius: 8px; }
.matching-left { font-weight: 600; color: #2d3436; }
.matching-row select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; min-width: 280px; }
