/* ============================================================================
   STUDENT CARDS & MIGRATION - Styles
   Data utworzenia: 21 stycznia 2026
   ============================================================================ */

/* ============================================================================
   KARTY UCZNIÓW - Grid Layout
   ============================================================================ */

.student-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.student-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.student-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.student-card.needs-migration {
    border-color: #ff9800;
    background: #fffaf0;
}

/* Header karty */
.student-card-header {
    background: linear-gradient(135deg, #5d4037 0%, #8d6e63 100%);
    color: white;
    padding: 15px;
    text-align: center;
}

.student-card-name {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: bold;
}

.student-card-id {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    margin-right: 8px;
}

.student-card-class {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
}

/* Body karty */
.student-card-body {
    padding: 15px;
    color: #333;
}

.student-card-section {
    margin-bottom: 12px;
    font-size: 0.95em;
    line-height: 1.6;
}

.student-card-section strong {
    color: #5d4037;
    display: block;
    margin-bottom: 4px;
}

.student-card-section span {
    color: #555;
}

.student-card-section code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.student-card-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 10px;
    border-radius: 4px;
    color: #e65100;
    font-size: 0.9em;
    margin-bottom: 12px;
}

/* Lista rodziców */
.parents-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.parents-list li {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.9em;
    line-height: 1.5;
}

.parents-list li:last-child {
    margin-bottom: 0;
}

/* Footer karty */
.student-card-footer {
    padding: 15px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.card-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.card-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-view {
    background: #2196f3;
    color: white;
}

.btn-view:hover {
    background: #1976d2;
}

.btn-edit {
    background: #4caf50;
    color: white;
}

.btn-edit:hover {
    background: #388e3c;
}

/* ============================================================================
   PANEL MIGRACJI
   ============================================================================ */

.migration-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.migration-form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 2px solid #ff9800;
}

.migration-form-header {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.migration-form-header h4 {
    margin: 0;
    font-size: 1.2em;
}

.migration-id {
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
}

.migration-form-body {
    padding: 20px;
}

.migration-form-row {
    margin-bottom: 15px;
}

.migration-form-row label {
    display: block;
    color: #5d4037;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.migration-form-row input[type="text"],
.migration-form-row input[type="email"],
.migration-form-row input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s;
}

.migration-form-row input:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255,152,0,0.1);
}

.migration-parent-section {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.migration-parent-section legend {
    color: #5d4037;
    font-weight: bold;
    font-size: 1em;
    padding: 0 10px;
}

.migration-parent-section input[type="text"],
.migration-parent-section input[type="email"],
.migration-parent-section input[type="tel"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.migration-parent-section input[type="text"]:focus,
.migration-parent-section input[type="email"]:focus,
.migration-parent-section input[type="tel"]:focus {
    outline: none;
    border-color: #ff9800;
}

.migration-form-footer {
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.migration-btn {
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.2s ease;
    text-transform: uppercase;
    width: 100%;
}

.btn-migrate {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.btn-migrate:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-migrate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.migration-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9em;
    text-align: center;
}

.migration-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.migration-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #e53935;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .student-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .student-card-footer {
        flex-direction: column;
    }
    
    .card-btn {
        width: 100%;
    }
}

/* ============================================================================
   MODAL EDYCJI KARTY UCZNIA
   ============================================================================ */

.edit-parent-section {
    margin-bottom: 15px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.edit-parent-section legend {
    color: #5d4037;
    font-weight: bold;
    padding: 0 10px;
}

.edit-parent-section input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95em;
    color: #333;
    background: white;
}

.edit-parent-section input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.edit-parent-section input:disabled {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

#edit-message {
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}

/* Ogólne style dla wszystkich inputów i selectów w modalu edycji */
#edit-student-modal input[type="text"],
#edit-student-modal input[type="email"],
#edit-student-modal input[type="tel"],
#edit-student-modal select {
    color: #333 !important;
    background: white !important;
}

#edit-student-modal input[disabled] {
    color: #666 !important;
    background: #f5f5f5 !important;
}

#edit-student-modal label {
    color: #333 !important;
}

#edit-student-modal h3,
#edit-student-modal h4 {
    color: #5d4037 !important;
}

/* Placeholdery */
#edit-student-modal input::placeholder {
    color: #999 !important;
    opacity: 1;
}

/* ============================================================================
   MODAL SZCZEGÓŁÓW UCZNIA - Kolory czcionek
   ============================================================================ */

#student-details-modal {
    color: #333 !important;
}

#student-details-modal h2,
#student-details-modal h3 {
    color: #5d4037 !important;
}

#student-details-modal p,
#student-details-modal strong,
#student-details-modal div {
    color: #333 !important;
}
