.ktp-app { max-width: 960px; margin: 0 auto; font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: #23282d; }
.ktp-guard { max-width: 480px; margin: 40px auto; text-align: center; }
.ktp-loading { padding: 40px; text-align: center; color: #666; }

.ktp-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ktp-toolbar h1 { font-size: 22px; margin: 0; }

.ktp-btn { display: inline-block; padding: 8px 14px; border-radius: 6px; border: 1px solid #2271b1; background: #2271b1; color: #fff; cursor: pointer; font-size: 13px; text-decoration: none; }
.ktp-btn:hover { background: #135e96; color: #fff; }
.ktp-btn.ktp-btn-secondary { background: #fff; color: #2271b1; }
.ktp-btn.ktp-btn-secondary:hover { background: #f0f6fc; }
.ktp-btn.ktp-btn-danger { background: #fff; color: #b32d2e; border-color: #b32d2e; }
.ktp-btn.ktp-btn-danger:hover { background: #fbeaea; }
.ktp-btn.ktp-btn-sm { padding: 4px 9px; font-size: 12px; }

.ktp-category { border: 1px solid #dcdcde; border-radius: 8px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.ktp-category-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #f6f7f7; cursor: pointer; }
.ktp-category-head.inactive { opacity: .55; }
.ktp-category-title { font-weight: 600; font-size: 15px; }
.ktp-category-title .ktp-badge { font-weight: 400; font-size: 11px; margin-left: 6px; color: #b32d2e; }
.ktp-category-actions { display: flex; gap: 6px; }
.ktp-category-body { padding: 12px 16px; display: none; }
.ktp-category-body.open { display: block; }

.ktp-course { border: 1px solid #eee; border-radius: 6px; margin-bottom: 8px; }
.ktp-course-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; cursor: pointer; }
.ktp-course-head.inactive { opacity: .55; }
.ktp-course-title { font-weight: 500; }
.ktp-course-body { padding: 8px 12px 12px; display: none; border-top: 1px solid #eee; }
.ktp-course-body.open { display: block; }

.ktp-lesson-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px; border-bottom: 1px dashed #eee; font-size: 13px; }
.ktp-lesson-row:last-child { border-bottom: none; }
.ktp-lesson-name .ktp-badge { font-size: 11px; color: #777; margin-left: 6px; }

.ktp-badge-private { color: #1e7e1e; font-weight: 600; }
.ktp-badge-shared { color: #996800; font-weight: 600; cursor: help; }

.ktp-add-row { margin-top: 8px; }

.ktp-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; z-index: 9999; overflow-y: auto; }
.ktp-modal { background: #fff; border-radius: 8px; width: 100%; max-width: 560px; padding: 20px 24px; }
.ktp-modal h2 { margin-top: 0; font-size: 17px; }
.ktp-field { margin-bottom: 12px; }
.ktp-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: #444; }
.ktp-field input[type=text], .ktp-field input[type=number], .ktp-field select, .ktp-field textarea {
    width: 100%; padding: 7px 9px; border: 1px solid #cbd0d4; border-radius: 5px; font-size: 13px; box-sizing: border-box;
}
.ktp-field textarea { min-height: 80px; font-family: Consolas, Menlo, monospace; }
.ktp-field-inline { display: flex; align-items: center; gap: 6px; }
.ktp-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ktp-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ktp-msg { padding: 8px 12px; border-radius: 5px; font-size: 13px; margin-bottom: 10px; }
.ktp-msg-error { background: #fbeaea; color: #b32d2e; }
.ktp-msg-success { background: #eafbea; color: #1e7e1e; }
.ktp-hint { font-size: 11px; color: #888; margin-top: 3px; }

.ktp-register, .ktp-pending { max-width: 560px; margin: 20px auto; }
.ktp-register h1, .ktp-pending h1 { font-size: 20px; }
.ktp-register-form .ktp-field { margin-bottom: 12px; }
.ktp-pending-options { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.ktp-pending-option { flex: 1 1 220px; border: 1px solid #dcdcde; border-radius: 8px; padding: 16px; background: #fff; }
.ktp-pending-option h3 { margin-top: 0; font-size: 15px; }
#ktp-pay-msg { margin-top: 8px; }

/* ============================================================
   MOTYW: rejestracja nauczyciela / ekran oczekiwania
   Koncepcja: tablica kredowa (naglowek) + kartka z zeszytu (formularz)
   Scopowane wylacznie pod .ktp-auth - nie zmienia wygladu reszty
   panelu (Kursy/Kody/Uczniowie/Postepy), ktory zostaje w konwencji
   funkcjonalnego dashboardu.
   ============================================================ */

.ktp-auth {
    --ktp-board: #1e352d;
    --ktp-board-2: #2a4a3e;
    --ktp-chalk: #eef1e9;
    --ktp-chalk-dim: #b9c9bd;
    --ktp-paper: #fbf8f1;
    --ktp-ink: #262a22;
    --ktp-accent: #e3a93f;
    --ktp-accent-dark: #c3872a;
    --ktp-rule: #b23a2e;
    max-width: 600px;
    margin: 32px auto;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(20, 35, 28, 0.18);
}

.ktp-auth-hero {
    background: radial-gradient(circle at 15% 20%, var(--ktp-board-2), var(--ktp-board) 70%);
    color: var(--ktp-chalk);
    padding: 40px 36px 32px;
    text-align: center;
    position: relative;
}
.ktp-auth-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--ktp-accent), var(--ktp-rule));
}
.ktp-auth-hero-sm { padding: 28px 36px 24px; }

.ktp-auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(238, 241, 233, 0.08);
    border: 1.5px solid rgba(238, 241, 233, 0.35);
    color: var(--ktp-accent);
    margin-bottom: 14px;
}

.ktp-auth-hero h1 {
    font-family: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 27px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    color: #fff;
}
.ktp-auth-hero-sm h1 { font-size: 21px; margin-bottom: 0; }

.ktp-auth-sub {
    color: var(--ktp-chalk-dim);
    font-size: 14.5px;
    line-height: 1.55;
    max-width: 420px;
    margin: 0 auto 18px;
}
.ktp-auth-card .ktp-auth-sub { color: #5b6259; }

.ktp-auth-price {
    display: inline-block;
    font-size: 13px;
    color: var(--ktp-chalk);
    background: rgba(238, 241, 233, 0.1);
    border: 1px solid rgba(238, 241, 233, 0.28);
    border-radius: 999px;
    padding: 7px 16px;
}
.ktp-auth-price strong { color: var(--ktp-accent); }

.ktp-auth-card {
    background: var(--ktp-paper);
    padding: 32px 36px 36px;
    position: relative;
    border-left: 4px solid var(--ktp-rule);
}

.ktp-auth .ktp-field { margin-bottom: 16px; }
.ktp-auth .ktp-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #6b7266;
    text-transform: none;
    margin-bottom: 5px;
}
.ktp-auth .ktp-field input,
.ktp-auth .ktp-field select,
.ktp-auth .ktp-field textarea {
    border: 1px solid #d8d2c0;
    background: #fff;
    border-radius: 8px;
    padding: 11px 13px;
    font-size: 14.5px;
    color: var(--ktp-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ktp-auth .ktp-field input:focus,
.ktp-auth .ktp-field select:focus {
    outline: none;
    border-color: var(--ktp-accent-dark);
    box-shadow: 0 0 0 3px rgba(227, 169, 63, 0.22);
}
.ktp-auth .ktp-row-2 { gap: 14px; }
.ktp-field-captcha input[type=number] { max-width: 120px; }

.ktp-auth-submit {
    width: 100%;
    background: var(--ktp-accent);
    border-color: var(--ktp-accent);
    color: #2b2110;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 18px;
    border-radius: 9px;
    margin-top: 6px;
}
.ktp-auth-submit:hover:not(:disabled) { background: var(--ktp-accent-dark); border-color: var(--ktp-accent-dark); color: #221a0c; }
.ktp-auth-submit:disabled { opacity: .5; cursor: not-allowed; }

.ktp-auth .ktp-msg { border-radius: 8px; }
.ktp-auth .ktp-msg-error { background: #fbeceb; color: #8f2f26; }
.ktp-auth .ktp-msg-success { background: #eaf4ec; color: #235f34; }

.ktp-auth .ktp-pending-options { margin-top: 20px; gap: 14px; }
.ktp-auth .ktp-pending-option {
    background: #fff;
    border: 1px solid #e6e0cf;
    border-radius: 10px;
    padding: 18px;
}
.ktp-auth .ktp-pending-option h3 {
    font-family: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15.5px;
    color: var(--ktp-ink);
}
.ktp-auth .ktp-pending-option p { color: #5b6259; font-size: 13.5px; line-height: 1.5; }

@media (max-width: 480px) {
    .ktp-auth { margin: 0; border-radius: 0; }
    .ktp-auth-hero, .ktp-auth-card { padding-left: 22px; padding-right: 22px; }
}

.ktp-tabs { display: flex; gap: 4px; border-bottom: 1px solid #dcdcde; margin-bottom: 16px; }
.ktp-tab-btn { background: none; border: none; padding: 10px 16px; font-size: 14px; cursor: pointer; color: #555; border-bottom: 2px solid transparent; }
.ktp-tab-btn.active { color: #2271b1; border-bottom-color: #2271b1; font-weight: 600; }
.ktp-tab-btn:hover { color: #2271b1; }

.ktp-form-card { border: 1px solid #dcdcde; border-radius: 8px; padding: 16px; margin-bottom: 20px; background: #fff; }
.ktp-form-card h3 { margin-top: 0; }

.ktp-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 13px; }
.ktp-table th, .ktp-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; }
.ktp-table thead th { background: #f6f7f7; font-weight: 600; }

.ktp-modal { max-width: 720px; }

.ktp-be-tools { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.ktp-be-grid-editor { display: grid; grid-template-columns: repeat(5, 44px); grid-template-rows: repeat(5, 44px); gap: 3px; margin-bottom: 14px; }
.ktp-be-cell { width: 44px; height: 44px; background: #f0f1f2; border: 1px solid #dcdcde; border-radius: 4px; cursor: pointer; }
.ktp-be-cell:hover { background: #e3f2fd; }
.ktp-be-cell.be-start { background: #2271b1; }
.ktp-be-cell.be-goal { background: #1e7e1e; }
.ktp-be-cell.be-obstacle { background: #444; }
.ktp-be-cell.be-start.be-goal { background: linear-gradient(135deg, #2271b1 50%, #1e7e1e 50%); }

.ktp-checkbox-list { display: flex; flex-wrap: wrap; gap: 10px; }
.ktp-checkbox-item { font-size: 13px; display: flex; align-items: center; gap: 4px; }

.ktp-qz-question { border: 1px solid #eee; border-radius: 6px; padding: 12px; margin-bottom: 12px; background: #fafafa; }
.ktp-qz-option-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ktp-qz-option-row .qz-option-text { flex: 1; }
.ktp-qz-question details { margin: 8px 0; font-size: 12px; }
.ktp-qz-question summary { cursor: pointer; color: #2271b1; }

.ktp-sheet-editor-wrap { overflow-x: auto; margin-bottom: 12px; }
.ktp-sheet-editor { border-collapse: collapse; }
.ktp-sheet-editor th { background: #f6f7f7; padding: 4px 6px; font-size: 11px; text-align: center; }
.ktp-sheet-cell { border: 1px solid #dcdcde; padding: 2px; position: relative; }
.ktp-sheet-cell.locked { background: #fff8e5; }
.ktp-sheet-cell .sh-cell-input { width: 64px; border: none; font-size: 12px; padding: 4px; }
.ktp-sheet-cell .sh-lock-btn { position: absolute; top: 0; right: 0; border: none; background: none; cursor: pointer; font-size: 10px; padding: 1px; }

/* ============================================================
   WIELOPRZEDMIOTOWOSC (v2.6.0): przelacznik przedmiotu, widget zakupu,
   zadania rachunkowe Fizyki
   ============================================================ */

.ktp-subject-switcher { margin-bottom: 14px; font-size: 13px; color: #444; }
.ktp-subject-switcher select { margin-left: 6px; padding: 4px 8px; border-radius: 5px; border: 1px solid #cbd0d4; }

.ktp-fiz-task { border: 1px solid #eee; border-radius: 6px; padding: 12px; margin-bottom: 12px; background: #fafafa; }

.ktp-purchase-widget { margin-top: 16px; }
.ktp-purchase-heading { font-size: 14px; margin: 16px 0 8px; }
.ktp-subject-checkbox { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 14px; }
.ktp-purchase-total { font-size: 14px; margin: 10px 0; }
#ktp-purchase-total { font-size: 16px; }

/* ============================================================
   PUBLICZNA OFERTA [oferta_przedmiotow] — karty pakietow/przedmiotow
   ============================================================ */

.ktp-offer {
    --ktp-o-ink: #1e352d;
    --ktp-o-muted: #5b6259;
    --ktp-o-paper: #fbf8f1;
    --ktp-o-line: #e6e0cf;
    --ktp-o-accent: #e3a93f;
    --ktp-accent: #e3a93f;
    --ktp-accent-dark: #c3872a;
    max-width: 1040px;
    margin: 32px auto;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.ktp-offer-hero { text-align: center; margin-bottom: 30px; }
.ktp-offer-hero h1 {
    font-family: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 30px;
    color: var(--ktp-o-ink);
    margin: 0 0 8px;
}
.ktp-offer-hero p { color: var(--ktp-o-muted); font-size: 15px; margin: 0; }

.ktp-offer-section-title {
    font-family: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 19px;
    color: var(--ktp-o-ink);
    margin: 30px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ktp-o-accent);
    display: inline-block;
}

.ktp-offer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-bottom: 6px;
}

.ktp-offer-card {
    background: var(--ktp-o-paper);
    border: 1px solid var(--ktp-o-line);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(30, 53, 45, 0.06);
    position: relative;
}
.ktp-offer-card-package {
    border-color: var(--ktp-o-accent);
    box-shadow: 0 6px 18px rgba(227, 169, 63, 0.18);
}
.ktp-offer-badge {
    position: absolute;
    top: -10px;
    right: 18px;
    background: var(--ktp-o-accent);
    color: #2b2110;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.ktp-offer-icon { font-size: 32px; margin-bottom: 6px; line-height: 1; }
.ktp-offer-card h3 {
    font-family: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 17px;
    margin: 0 0 8px;
    color: var(--ktp-o-ink);
}
.ktp-offer-desc { font-size: 13.5px; color: var(--ktp-o-muted); line-height: 1.55; flex-grow: 1; margin: 0 0 14px; }
.ktp-offer-includes { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.ktp-offer-includes li { background: #eef1e9; border-radius: 999px; padding: 4px 10px; font-size: 12px; color: #33402f; }
.ktp-offer-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ktp-offer-price {
    font-family: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ktp-o-ink);
}
.ktp-offer-savings { font-size: 11.5px; color: #1e7e1e; font-weight: 600; background: #eaf4ec; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.ktp-offer-card .ktp-auth-submit { margin-top: auto; width: 100%; text-align: center; box-sizing: border-box; }

@media (max-width: 480px) {
    .ktp-offer { margin: 16px auto; padding: 0 12px; }
    .ktp-offer-hero h1 { font-size: 24px; }
}
