/* ============================================
   Yetkinlik ve Ders Yönetim Sistemi - Ana Stil Dosyası
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
}

/* ============================================
   Login Page Styles
   ============================================ */
body.login-page {
    background: #f0f2f5;
    background-image: radial-gradient(circle at 50% 0%, #ffffff 0%, #f0f2f5 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.login-navbar {
    background: transparent;
    box-shadow: none;
    width: 100%;
}

.login-container {
    background: white;
    padding: 48px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 440px;
    margin: auto;
    position: relative;
}

/* Optional top bar for window effect */
.login-container::before {
    content: "•••";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: #f8f9fa;
    border-radius: 20px 20px 0 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #ccc;
    font-size: 24px;
    line-height: 16px;
    padding-left: 20px;
    letter-spacing: 2px;
}

.footer-main {
    width: 100%;
    padding: 30px 48px 10px 48px;
    color: #444;
    font-size: 14px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-contact h4,
.footer-right h4 {
    margin-bottom: 12px;
    font-size: 16px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 8px;
    display: inline-block;
    color: #333;
}

.footer-contact p {
    margin-bottom: 8px;
    color: #555;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-btn {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: #a50000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(165, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.footer-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(165, 0, 0, 0.15);
    border-color: rgba(165, 0, 0, 0.4);
}

.footer-b {
    width: 100%;
    align-self: stretch;
    padding: 10px 48px 30px 48px;
    color: #777;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    flex-shrink: 0;
}

.footer-right-b {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #a50000;
}

.footer-separator {
    color: #ccc;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.emoji {
    font-size: 48px;
    margin-bottom: 16px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #a50000 0%, #64000b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(165, 0, 0, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-demo {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 12px;
}

.btn-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.4);
}

.btn-demo:active {
    transform: translateY(0);
}

.error-message {
    background: #fee;
    color: #c00;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #c00;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    background: linear-gradient(135deg, #a50000 0%, #64000b 100%);
    color: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-navbar {
    background: transparent !important;
    box-shadow: none !important;
}

.navbar h1 {
    font-size: 24px;
    font-weight: 600;
}

.login-navbar .navbar-title {
    color: #333;
    border-left: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo {
    height: 44px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.login-navbar .navbar-logo {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.3px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 12px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user span {
    font-size: 14px;
    opacity: 0.9;
}

.btn-logout,
.btn-back {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-logout:hover,
.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

.container.narrow {
    max-width: 900px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 8px;
}

.page-header p {
    color: #666;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

/* ============================================
   Course Cards (Dashboard)
   ============================================ */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.course-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.course-card .course-header {
    background: linear-gradient(135deg, #a50000 0%, #64000b 100%);
    color: white;
    padding: 20px;
}

.course-code {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.course-name {
    font-size: 20px;
    font-weight: 600;
}

.course-body {
    padding: 20px;
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.student-count {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    margin-top: 12px;
}

.no-courses {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-courses .emoji {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-courses h3 {
    color: #333;
    margin-bottom: 8px;
}

.no-courses p {
    color: #666;
}

/* ============================================
   Course Detail Page Header
   ============================================ */
.course-header {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.course-header h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 8px;
}

.course-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    color: #666;
    font-size: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   Info Grid
   ============================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.info-label {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    /* flex-start olduğu için hafif aşağı alalım */
}

.info-value {
    color: #333;
    font-weight: 500;
    font-size: 16px;
    text-align: right;
    flex: 1;
    /* Boşluğu doldur */
    word-break: break-word;
    /* Çok uzun kelimeleri kır */
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.password-label-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}

.password-label-group label {
    margin-bottom: 0;
}

.forgot-password {
    font-size: 13px;
    color: #a50000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #cc0000;
    text-decoration: underline;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a50000;
    box-shadow: 0 0 0 3px rgba(165, 0, 0, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    background: white;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group.half {
    flex: 1;
}

/* ============================================
   Buttons
   ============================================ */
.btn-save {
    background: linear-gradient(135deg, #a50000 0%, #64000b 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(165, 0, 0, 0.4);
}

.btn-save-sm {
    background: linear-gradient(135deg, #a50000 0%, #64000b 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-save-sm:hover {
    transform: translateY(-1px);
}

.btn-cancel {
    background: #eee;
    color: #666;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #ddd;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-delete:hover {
    background: #fee;
}

.btn-delete-sm {
    background: transparent;
    color: #764ba2;
    border: 2px solid #764ba2;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-sm:hover {
    background: #764ba2;
    color: white;
}

/* ============================================
   Messages
   ============================================ */
.message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* ============================================
   Exam Cards
   ============================================ */
.exam-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border-left: 4px solid #a50000;
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.exam-type {
    background: linear-gradient(135deg, #a50000 0%, #64000b 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.exam-date {
    color: #666;
    font-size: 14px;
}

.exam-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.exam-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.question-badge {
    background: #fde8e8;
    color: #af5151;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.exam-summary {
    display: flex;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   Questions Grid (Exam Form)
   ============================================ */
.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.question-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.question-input label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.question-input input {
    width: 100%;
    padding: 8px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    transition: border-color 0.3s;
}

.question-input input:focus {
    outline: none;
    border-color: #667eea;
}

/* ============================================
   Edit Form
   ============================================ */
.edit-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px dashed #ddd;
}

.edit-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* ============================================
   Utility
   ============================================ */
.no-data {
    color: #888;
    text-align: center;
    padding: 24px;
}

/* ============================================
   Students Table
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

.students-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.students-table th,
.students-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.students-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
}

.students-table tbody tr:hover {
    background: #f8f9fa;
}

.student-name {
    font-weight: 500;
    color: #333;
}

.student-email {
    font-size: 12px;
    color: #888;
}

.letter-grade {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

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

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

/* Grade Form Row */
.grade-form-row {
    background: #f8f9fa;
}

.grade-form-row td {
    padding: 16px;
}

.inline-grade-form {
    display: block;
}

.grade-inputs {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.grade-input {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grade-input label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.grade-input input {
    width: 100px;
    padding: 8px 12px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.grade-input input:focus {
    outline: none;
    border-color: #667eea;
}

/* ============================================
   Outcome Badges (ÖÇ & PÇ)
   ============================================ */
.outcome-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.lo-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.po-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

/* Matrix Table Styles */
.matrix-cell {
    text-align: center;
    vertical-align: middle;
}

.matrix-cell select {
    width: 50px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* ============================================
   Responsive Design (Media Queries)
   ============================================ */

/* Tablet (Max Width: 992px) */
@media screen and (max-width: 992px) {
    .container {
        padding: 24px 16px;
    }

    .login-container {
        padding: 32px 24px;
        margin: 20px;
        width: calc(100% - 40px);
    }

    .footer-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px 10px 20px;
        gap: 24px;
    }

    .footer-right {
        align-items: center;
    }

    .footer-b {
        flex-direction: column;
        gap: 12px;
        padding: 10px 20px 20px 20px;
        text-align: center;
    }

    .footer-right-b {
        justify-content: center;
    }
}

/* Mobile (Max Width: 768px) */
@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        text-align: center;
    }

    .navbar-brand {
        flex-direction: column;
        gap: 8px;
    }

    .navbar-title {
        border-left: none !important;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 8px;
        font-size: 14px;
        text-align: center;
    }

    .login-navbar .navbar-title {
        border-top: 1px solid rgba(0, 0, 0, 0.2) !important;
    }

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

    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .course-meta {
        flex-direction: column;
        gap: 12px;
    }

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

    .exam-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .exam-summary {
        flex-direction: column;
        gap: 12px;
    }

    .grade-inputs {
        flex-direction: column;
        align-items: flex-start;
    }

    .grade-form-row .grade-inputs {
        gap: 8px;
    }

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

    .page-header>div {
        width: 100%;
    }

    .page-header button {
        width: 100%;
    }
}

/* Small Mobile (Max Width: 480px) */
@media screen and (max-width: 480px) {
    .login-container {
        padding: 24px 16px;
        width: calc(100% - 32px);
        margin: 16px;
    }

    .login-container::before {
        height: 24px;
        font-size: 18px;
        line-height: 12px;
    }

    .btn-login,
    .btn-save,
    .btn-save-sm {
        width: 100%;
        margin-bottom: 8px;
    }

    .footer-links {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .footer-btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .password-label-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .course-header h2 {
        font-size: 20px;
    }

    .navbar-title {
        display: none;
    }
}
/* ============================================
   Version Notes Styling
   ============================================ */
.version-list-header {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-top: 12px;
    margin-bottom: 8px;
}

.version-item-list {
    padding-left: 20px;
    margin-bottom: 16px;
    list-style-type: disc;
}

.version-item-list li {
    margin-bottom: 4px;
}
