/* Reset a základné štýly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    line-height: 1.6;
    padding: 2rem 1rem;
}

.container {
    max-width: 700px;
    margin: 0 auto;
}

.admin-container {
    max-width: 900px;
}

/* Header */
.header {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.header-top {
    margin-bottom: 0.75rem;
}

.header h1 {
    color: #1f2937;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.header p {
    color: #6b7280;
}

.school-name {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.department-name {
    font-weight: 600;
    color: #3b82f6;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.department-desc {
    font-size: 0.9rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-admin {
    background-color: #fef3c7;
    color: #92400e;
}

/* Sekcie */
.section {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.section h2 {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Správy */
.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.hidden {
    display: none !important;
}

/* Grid odborov */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.department-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.department-card:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.department-card h3 {
    color: #1f2937;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.department-card p {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.department-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    font-weight: 600;
    color: #374151;
}

.stat-label {
    color: #9ca3af;
}

/* Detail odboru */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-close {
    background: #f3f4f6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.9rem;
}

.btn-close:hover {
    background: #e5e7eb;
}

/* Link box */
.link-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.link-box label {
    display: block;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.link-copy {
    display: flex;
    gap: 0.5rem;
}

.link-copy input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
}

.btn-copy {
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-copy:hover {
    background: #2563eb;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
}

.stat-card-title {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-card-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.stat-card-subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Registrations list */
.registrations-list {
    margin-bottom: 1.5rem;
}

.course-block {
    margin-bottom: 1.5rem;
}

.course-block:last-child {
    margin-bottom: 0;
}

.course-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.course-block-title {
    font-weight: 600;
    color: #374151;
}

.course-block-count {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #e5e7eb;
    color: #4b5563;
}

.course-block-count.full {
    background: #fee2e2;
    color: #991b1b;
}

.students-table {
    width: 100%;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.students-table th,
.students-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.students-table th {
    background: #e5e7eb;
    font-weight: 600;
    color: #374151;
}

.students-table tr:last-child td {
    border-bottom: none;
}

.no-students {
    color: #9ca3af;
    font-style: italic;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    text-align: center;
}

/* Export section */
.export-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-export {
    padding: 0.75rem 1.5rem;
    background: #059669;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-export:hover {
    background: #047857;
}

/* Global actions */
.global-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Formulárová sekcia */
.form-section {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.form-section h2 {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Zoznam predmetov */
.courses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.course-option {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.course-option:hover:not(.disabled) {
    border-color: #93c5fd;
    background-color: #f9fafb;
}

.course-option.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.course-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f3f4f6;
}

.course-option input[type="radio"] {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    cursor: pointer;
}

.course-option.disabled input[type="radio"] {
    cursor: not-allowed;
}

.course-info {
    flex: 1;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.course-name {
    font-weight: 600;
    color: #1f2937;
}

.course-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Badge pre kapacitu */
.capacity-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.capacity-badge.available {
    background-color: #d1fae5;
    color: #065f46;
}

.capacity-badge.limited {
    background-color: #fef3c7;
    color: #92400e;
}

.capacity-badge.full {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Submit tlačidlo */
.btn-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover:not(:disabled) {
    background-color: #2563eb;
}

.btn-submit:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Reset tlačidlo */
.btn-reset {
    padding: 0.75rem 1.5rem;
    background-color: #fee2e2;
    color: #991b1b;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-reset:hover {
    background-color: #fecaca;
}

/* Error page */
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.error-box {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.error-box h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #374151;
}

.error-box p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/* Loading */
.loading {
    color: #6b7280;
    text-align: center;
    padding: 1rem;
}

/* =====================================================
   ADMIN LOGIN OVERLAY
   ===================================================== */

.admin-login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.admin-login-box {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.admin-login-box h2 {
    font-size: 1.4rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.admin-login-box p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Odhlásiť sa tlačidlo v headeri */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.btn-logout {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* =====================================================
   DVOJKROKOVÝ PROCES – INDIKÁTOR KROKOV
   ===================================================== */

.step-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 1.75rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: #e5e7eb;
    color: #6b7280;
    flex-shrink: 0;
}

.step.active .step-number {
    background: #3b82f6;
    color: white;
}

.step.done .step-number {
    background: #10b981;
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
}

.step.active .step-label {
    color: #1f2937;
    font-weight: 600;
}

.step.done .step-label {
    color: #10b981;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 0.75rem;
}

.step-line.done {
    background: #10b981;
}

/* Popis kroku */
.step-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Hint pod poľom */
.field-hint {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.3rem;
}

/* Overený používateľ */
.verified-user-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.5rem;
}

.verified-icon {
    width: 32px;
    height: 32px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.verified-user-box strong {
    display: block;
    color: #065f46;
    font-size: 0.95rem;
}

.verified-email {
    font-size: 0.85rem;
    color: #047857;
}

/* Input type number – čistý vzhľad */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Footer */
.footer {
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Responzívne úpravy */
@media (max-width: 640px) {
    body {
        padding: 1rem 0.5rem;
    }

    .header, .form-section, .section {
        padding: 1rem 1.25rem;
    }

    .course-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .detail-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .link-copy {
        flex-direction: column;
    }

    .export-section,
    .global-actions {
        flex-direction: column;
    }

    .departments-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
