.term-wrap {
    max-width: 480px;
    margin: 0 auto;
    font-family: system-ui, Arial, sans-serif;
    color: #222;
}

.term-naglowek {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.term-tytul-miesiaca {
    font-weight: 600;
    font-size: 1.1rem;
}

.term-nav {
    background: #2f6f4f;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
}
.term-nav:hover { background: #24583e; }

.term-dni-tyg {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
}

.term-siatka {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.term-dzien {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.15s;
}
.term-dzien:hover { background: #eef6f0; }

.term-dzien-pusty {
    visibility: hidden;
    cursor: default;
}

.term-dzis {
    border-color: #2f6f4f;
    font-weight: 700;
}

.term-numer-dnia { font-size: 0.9rem; }

.term-znacznik {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: #2f6f4f;
    color: #fff;
    border-radius: 999px;
    font-size: 0.65rem;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Modal dnia */
.term-modal-tlo {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.term-modal {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.term-modal-zamknij {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #888;
}

.term-modal-data {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.term-lista-zadan {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.term-zadanie {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 10px;
}

.term-godzina {
    font-weight: 600;
    color: #2f6f4f;
    min-width: 42px;
}

.term-tresc { flex: 1; }
.term-tresc small { color: #666; }

.term-usun {
    background: none;
    border: none;
    color: #b03030;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

.term-brak, .term-ladowanie {
    color: #888;
    font-style: italic;
    padding: 6px 0;
}

.term-form-dodaj {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.term-form-dodaj input,
.term-form-dodaj textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font: inherit;
}

.term-form-dodaj textarea { resize: vertical; min-height: 50px; }

.term-form-dodaj button {
    background: #2f6f4f;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px;
    cursor: pointer;
    font-weight: 600;
}
.term-form-dodaj button:hover { background: #24583e; }

/* Telefony */
@media (max-width: 400px) {
    .term-znacznik { font-size: 0.6rem; }
}
