* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 24px;
    color: #2c3e50;
    font-size: 1.5em;
}

/* Krok 1 - wybór problemu */
#step-problem {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

#step-problem h2 {
    text-align: center;
    font-size: 1.1em;
    color: #555;
    margin-bottom: 8px;
}

.problem-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 1em;
    border: 2px solid #3498db;
    background: #fff;
    color: #2c3e50;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.problem-btn:hover {
    background: #3498db;
    color: #fff;
}

.problem-btn.selected {
    background: #2980b9;
    color: #fff;
    border-color: #2980b9;
}

/* Krok 2 - formularz + wskazówki */
#step-form {
    display: none;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #3498db;
    cursor: pointer;
    font-size: 0.95em;
}

.back-link:hover {
    text-decoration: underline;
}

.selected-problem {
    background: #2980b9;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
}

.columns {
    display: flex;
    gap: 24px;
}

.col-left {
    flex: 1;
    min-width: 0;
}

.col-right {
    flex: 1;
    min-width: 0;
}

/* Formularz */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9em;
    color: #444;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-group .hint {
    font-size: 0.82em;
    color: #777;
    margin-top: 3px;
}

.desc-hint {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
    font-size: 0.88em;
    color: #856404;
}

.submit-btn {
    padding: 10px 32px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #219a52;
}

.submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Wskazówki po prawej */
.tips-box {
    background: #eaf6ff;
    border: 1px solid #b3d9f2;
    border-radius: 8px;
    padding: 16px 20px;
}

.tips-box h3 {
    font-size: 1em;
    margin-bottom: 10px;
    color: #2471a3;
}

.tips-box ul {
    padding-left: 20px;
}

.tips-box li {
    margin-bottom: 6px;
    font-size: 0.92em;
    line-height: 1.4;
}

/* Komunikaty */
.msg {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 14px;
    font-size: 0.95em;
}

.msg-ok {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.msg-err {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Hasło rate-limit */
#password-group {
    display: none;
}

#password-group.visible {
    display: block;
}

/* Panel nauczyciela */
.login-box {
    max-width: 360px;
    margin: 60px auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-box h2 {
    margin-bottom: 20px;
    text-align: center;
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header a {
    color: #e74c3c;
    text-decoration: none;
}

.report-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 12px;
}

.report-card .meta {
    font-size: 0.82em;
    color: #888;
    margin-bottom: 6px;
}

.report-card .problem-label {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.report-card .desc {
    font-size: 0.93em;
    color: #555;
}

.date-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.date-nav input {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.date-nav button {
    padding: 6px 16px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.no-reports {
    color: #888;
    text-align: center;
    padding: 40px;
}

@media (max-width: 700px) {
    .columns {
        flex-direction: column;
    }
}
