/* Admin rozhraní styly */

/* Přihlašovací box */
.admin-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 2rem;
}

.login-box {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
}

.login-box h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

/* Admin panel */
.admin-panel {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-header h2 {
    margin: 0;
    color: var(--text-primary);
}

/* Tabulka */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table thead {
    background: var(--background);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.admin-table tbody tr:hover {
    background: var(--background);
}

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

.text-muted {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Admin akce */
.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.delete-form {
    display: inline;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Responzivní tabulka */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table thead,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td,
    .admin-table th {
        display: block;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 1rem;
        background: var(--surface);
    }

    .admin-table td {
        border: none;
        padding: 0.5rem 0;
        position: relative;
        padding-left: 50%;
    }

    .admin-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: var(--text-primary);
    }

    .admin-actions {
        flex-direction: column;
    }

    .admin-actions .btn {
        width: 100%;
    }
}

/* Admin nastavení */
.admin-settings {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.admin-settings h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.setting-item strong {
    color: var(--primary-color);
}

.setting-hint {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.setting-hint code {
    background: var(--background);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--surface);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal form {
    padding: 1.5rem;
}

.btn-info {
    background-color: #3b82f6;
    color: white;
}

.btn-info:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Nefungující projekty */
.broken-projects {
    margin-bottom: 2rem;
    border: 2px solid #f59e0b;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: #fef3c7;
}

.broken-projects-header {
    margin: 0 0 1rem 0;
    color: #92400e;
    font-size: 1.25rem;
}

.broken-project-row {
    background: #fffbeb !important;
}

.broken-project-row:hover {
    background: #fef3c7 !important;
}

.admin-projekty-list h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

/* Správa témat */
.admin-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.admin-section h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.admin-card h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.temata-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tema-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    transition: var(--transition);
}

.tema-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.tema-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.tema-item-header strong {
    font-size: 1.1rem;
    color: var(--text-primary);
}

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

.badge-success {
    background: var(--success-color);
    color: white;
}

.tema-item-content {
    margin-bottom: 1rem;
}

.tema-item-content p {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.tema-item-popis {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    font-style: italic;
}

.tema-item-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

