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

body {
    font-family: 'Poppins', sans-serif;
    background: #f97316;
    color: #1c1917;
    min-height: 100vh;
}

/* ========== AUTH ========== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: #fff7ed;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 16px;
    padding: 28px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 40px rgba(124, 45, 18, 0.28);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #ffedd5;
    color: #9a3412;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.auth-tab.active {
    background: #f97316;
    color: white;
}

.auth-input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #fdba74;
    border-radius: 8px;
    background: #ffffff;
    color: #1c1917;
    font-size: 14px;
    outline: none;
}

.auth-input:focus {
    border-color: #f97316;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #f97316;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.auth-btn:hover {
    background: #ea580c;
}

/* ========== HEADER ========== */
.teacher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #ea580c;
    border-bottom: 1px solid rgba(255,255,255,0.25);
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-brand h1 {
    font-size: 16px;
    font-weight: 600;
}

.brand-icon {
    font-size: 22px;
}

.logout-btn {
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* ========== DASHBOARD ========== */
.dashboard-content {
    padding: 18px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.teacher-actions-card {
    background: #fff7ed;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    margin-bottom: 10px;
    color: #1c1917;
}

.grade-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.grade-card {
    background: #fff7ed;
    border: 1px solid rgba(255,255,255,0.45);
    border-top: 4px solid #f97316;
    border-radius: 14px;
    padding: 20px 16px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #1c1917;
}

.grade-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    border-color: rgba(255,255,255,0.15);
}

.grade-card.locked {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.4);
}

.grade-card.locked:hover {
    transform: none;
    box-shadow: none;
}

.grade-card h3 {
    font-size: 16px;
    margin: 6px 0 4px;
    font-weight: 600;
}

.grade-card p {
    font-size: 12px;
    color: #9a3412;
    margin: 0;
}

.card-action {
    font-size: 13px;
    color: #c2410c;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.card-action::after {
    content: "→";
    font-size: 14px;
}

.progress-bar-container {
    background: #ffedd5;
    border-radius: 10px;
    height: 14px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #06b6d4, #10b981);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ========== TABLOLAR ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 9px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    vertical-align: middle;
}

.data-table th {
    background: #ffedd5;
    font-weight: 600;
    font-size: 12px;
    color: #9a3412;
    white-space: nowrap;
}

.data-table td:nth-child(2) {
    text-align: left !important;
    white-space: nowrap !important;
}

.data-table tr:hover {
    background: rgba(255,255,255,0.03);
}

.doc-table th,
.doc-table td {
    color: #1c1917;
    text-align: left;
    border-bottom: 1px solid #fed7aa;
}

.data-table.doc-table td:nth-child(2) {
    white-space: normal !important;
    text-align: left !important;
}

.doc-mini {
    width: auto !important;
    display: inline-block;
    padding: 6px 10px;
    margin: 2px 4px 2px 0;
    font-size: 12px;
}

.sheet-tabs { margin-bottom: 8px; }
.sheet-wrap { overflow: auto; max-height: 68vh; background: #fff; border-radius: 12px; margin-bottom: 10px; }
.sheet-grid { border-collapse: collapse; font-size: 13px; color: #1c1917; background: #fff; min-width: max-content; }
.sheet-grid td {
    border: 1px solid #fdba74;
    padding: 6px 8px;
    min-width: 92px;
    height: 34px;
    vertical-align: middle;
    background: #fff;
    white-space: nowrap;
}
.sheet-grid td.head { background: #c2410c; color: #fff; font-weight: 700; text-align: center; position: sticky; top: 0; z-index: 1; }
.sheet-grid td.formula { background: #fff7ed; color: #44403c; text-align: center; }
.sheet-grid td[contenteditable="true"]:focus { outline: 2px solid #ea580c; background: #ffedd5; }
.sheet-grid td.paste { background: #fff7ed; }
.sheet-grid td.name, .sheet-grid td.head:nth-child(2) { min-width: 180px; text-align: left; }

/* Badge */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-high { background: #166534; color: #86efac; }
.badge-mid  { background: #854d0e; color: #fde047; }
.badge-low  { background: #991b1b; color: #fca5a5; }
.badge-neutral { background: #334155; color: #94a3b8; }

/* Butonlar */
.btn-pastel-green {
    background: #166534;
    color: #86efac;
    border: none;
    border-radius: 5px;
    padding: 3px 8px;
    cursor: pointer;
    font-weight: 700;
}

.btn-pastel-red {
    background: #991b1b;
    color: #fca5a5;
    border: none;
    border-radius: 5px;
    padding: 3px 8px;
    cursor: pointer;
    font-weight: 700;
}

.btn-pastel-gray {
    background: #475569;
    color: #e2e8f0;
    border: none;
    border-radius: 5px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 11px;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-box {
    background: #fff7ed;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 14px;
    padding: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    color: #1c1917;
}

.modal-title {
    font-size: 16px;
    margin-bottom: 14px;
    color: #1c1917;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* ========== PRINT AREA ========== */
.print-area {
    background: #fff7ed;
    border-radius: 10px;
    padding: 14px;
    color: #1c1917;
}

.print-header {
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.print-header h2 {
    font-size: 14px;
    color: #1c1917;
}

.print-header h3 {
    font-size: 12px;
    color: #9a3412;
    margin-top: 3px;
}

.print-info {
    background: #ffffff;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.5;
}

.print-info p {
    margin: 2px 0;
}

/* ========== YENİ: İLERLEME ÇUBUĞU ========== */
.progress-bar-container {
    background: #ffffff;
    border-radius: 8px;
    height: 10px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #10b981);
    border-radius: 8px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 12px;
    color: #9a3412;
    margin-bottom: 4px;
}

/* ========== YENİ: İÇERİK KARTLARI ========== */
.content-card {
    background: #fff7ed;
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: 0.2s;
    color: #1c1917;
}

.content-card:hover {
    border-color: rgba(59,130,246,0.4);
}

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

.content-type-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.content-type-pptx { background: #7c3aed; color: #e9d5ff; }
.content-type-pdf { background: #dc2626; color: #fecaca; }
.content-type-video { background: #0891b2; color: #a5f3fc; }
.content-type-experiment { background: #059669; color: #a7f3d0; }
.content-type-quiz { background: #d97706; color: #fde68a; }

/* ========== YENİ: QUIZ ALANI ========== */
.quiz-question {
    background: #fff7ed;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 6px 0;
    border-radius: 8px;
    background: #ffedd5;
    cursor: pointer;
    transition: 0.15s;
}

.quiz-option:hover {
    background: rgba(59,130,246,0.15);
}

.quiz-option.selected {
    background: rgba(59,130,246,0.25);
    border: 1px solid #f97316;
}

.quiz-option.correct {
    background: rgba(22,101,52,0.3);
    border: 1px solid #16a34a;
}

.quiz-option.wrong {
    background: rgba(153,27,27,0.3);
    border: 1px solid #dc2626;
}

/* ========== YENİ: IFRAME DENEY ========== */
.experiment-frame {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    border: none;
    border-radius: 10px;
    background: #1a0d08;
}

/* ========== YENİ: TAMAMLANDI BUTONU ========== */
.btn-completed {
    background: #166534;
    color: #86efac;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-not-completed {
    background: #334155;
    color: #9a3412;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* ========== MOBİL ========== */
@media (max-width: 600px) {
    .dashboard-content {
        padding: 10px;
    }

    .grade-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .grade-card {
        padding: 12px 10px;
        min-height: 100px;
        border-radius: 10px;
    }

    .grade-card h3 {
        font-size: 13px;
        margin: 4px 0 2px;
    }

    .grade-card p {
        font-size: 10px;
    }

    .card-action {
        font-size: 11px;
    }

    .data-table {
        font-size: 11px;
    }

    .data-table th,
    .data-table td {
        padding: 6px 4px;
    }

    .auth-card {
        padding: 18px 14px;
    }

    .experiment-frame {
        height: 280px;
    }

    .teacher-header, .student-header {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-brand {
        flex: 1;
        min-width: 0;
    }

    .header-brand h1 {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    .logout-btn {
        padding: 6px 10px;
        font-size: 11px;
        flex-shrink: 0;
    }
}

@media (max-width: 400px) {
    .grade-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .grade-card {
        min-height: 80px;
    }
}
